From 1520dfe4ba97f9c2b05333ea7a93217911c3caee Mon Sep 17 00:00:00 2001 From: Phill Pover Date: Mon, 7 Apr 2025 11:52:11 +0100 Subject: [PATCH] Fixing messages --- frontend/src/app/album/page.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/album/page.tsx b/frontend/src/app/album/page.tsx index aef3380..c977152 100644 --- a/frontend/src/app/album/page.tsx +++ b/frontend/src/app/album/page.tsx @@ -49,20 +49,20 @@ export default function Page() { await createAlbum(formData) .then(response => { if (response.ok) { - handleSnackbar(`Successfully created Album with ID ${formData.get("id")}: ${result}`, true); + handleSnackbar(`Successfully created Album with ID ${formData.get("id")}: ${response}`, true); } Promise.reject(response); }) - .catch(error => {handleSnackbar(`Failed to create Album with ID ${formData.get("id")}: ${result}`, false);}); + .catch(error => {handleSnackbar(`Failed to create Album with ID ${formData.get("id")}: ${error}`, false);}); } else { await updateAlbum(formData) .then(response => { if (response.ok) { - handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${result}`, true); + handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${response}`, true); } Promise.reject(response); }) - .catch(error => {handleSnackbar(`Failed to update Album with ID ${formData.get("id")}: ${result}`, false);}); + .catch(error => {handleSnackbar(`Failed to update Album with ID ${formData.get("id")}: ${error}`, false);}); } revalidateAlbums(); const data = await getAlbums();