ok
This commit is contained in:
@@ -62,6 +62,28 @@ export const saveWelcomePageConfig = async (cafeId, details) => {
|
||||
};
|
||||
|
||||
|
||||
export async function getCafeByIdentifier(cafeIdentifyName) {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`${API_BASE_URL}/cafe/get-cafeId/` + cafeIdentifyName,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
const cafeId = await response.json();
|
||||
return cafeId;
|
||||
} catch (error) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
export async function getOwnedCafes(userId) {
|
||||
try {
|
||||
const response = await fetch(
|
||||
|
||||
Reference in New Issue
Block a user