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();