This commit is contained in:
client perkafean
2024-08-26 06:34:56 +00:00
parent 696ac38e33
commit 3a2e388a33
16 changed files with 1162 additions and 43 deletions

View File

@@ -28,7 +28,7 @@ export async function getOwnedCafes(userId) {
}
}
export async function createCafe(userId) {
export async function createCafe(cafeName) {
try {
const response = await fetch(`${API_BASE_URL}/cafe/create-cafe`, {
method: "POST",
@@ -36,7 +36,8 @@ export async function createCafe(userId) {
"Content-Type": "application/json",
Authorization: `Bearer ${getAuthToken()}`,
},
body: JSON.stringify({ ownerId: userId }),
body: JSON.stringify({
name: cafeName }),
});
if (!response.ok) {