From 6d7f3b40943348f70361135a4ba49d7ad18c39e3 Mon Sep 17 00:00:00 2001 From: Phill Pover Date: Mon, 7 Apr 2025 11:46:35 +0100 Subject: [PATCH] Fixing messages --- frontend/src/app/album/page.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/album/page.tsx b/frontend/src/app/album/page.tsx index 003309f..05c1924 100644 --- a/frontend/src/app/album/page.tsx +++ b/frontend/src/app/album/page.tsx @@ -49,21 +49,21 @@ export default function Page() { const result = await createAlbum(formData) .then(response => { if (response.ok) { - return response.json() + return response } Promise.reject(response); }) - .catch(error => {return error.json()}); - handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${result}`, true); + .catch(error => {return error}); + handleSnackbar(`Successfully created Album with ID ${formData.get("id")}: ${result}`, true); } else { const result = await updateAlbum(formData) .then(response => { if (response.ok) { - return response.json() + return response } Promise.reject(response); }) - .catch(error => {return error.json()}); + .catch(error => {return error}); handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${result}`, true); } revalidateAlbums();