This commit is contained in:
zadit
2024-10-17 00:15:35 +07:00
parent 4dd12f3835
commit 8f50909e1a
23 changed files with 415 additions and 177 deletions

View File

@@ -193,12 +193,12 @@ export const getAllCafeOwner = async (formData) => {
}
};
export const createCafeOwner = async (shopId, email, username, password) => {
export const createCafeOwner = async (email, username, password) => {
const token = getLocalStorage("auth");
if (token) {
try {
const response = await fetch(
API_BASE_URL + "/user/create-clerk/" + shopId,
API_BASE_URL + "/user/create-admin/" ,
{
method: "POST",
headers: {
@@ -276,6 +276,7 @@ export const createClerks = async (shopId, email, username, password) => {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
console.log(data)
return data;
} catch (error) {
console.error("Error getting clerk:", error);