More error message work
All checks were successful
Music Collection CI Workflow / test (./backend) (push) Successful in 36s
Music Collection CI Workflow / test (./frontend) (push) Successful in 39s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 53s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m48s
Music Collection CI Workflow / deploy (push) Successful in 24s

This commit is contained in:
Phill Pover 2025-04-07 12:37:34 +01:00
parent 413e038227
commit 598132fe36

View File

@ -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")}: ${response.json()}`, true);
handleSnackbar(`Successfully created Album with ID ${formData.get("id")}: ${JSON.stringify(response)}`, true);
}
handleSnackbar(`Failed to create Album with ID ${formData.get("id")}: ${response.json()}`, false);
handleSnackbar(`Failed to create Album with ID ${formData.get("id")}: ${JSON.stringify(response)}`, false);
})
.catch(error => {handleSnackbar(`Failed to create Album with ID ${formData.get("id")}: ${error.json()}`, false);});
.catch(error => {handleSnackbar(`Failed to create Album with ID ${formData.get("id")}: ${JSON.stringify(error)}`, false);});
} else {
await updateAlbum(formData)
.then(response => {
if (response.ok) {
handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${response.json()}`, true);
handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${JSON.stringify(response)}`, true);
}
handleSnackbar(`Failed to update Album with ID ${formData.get("id")}: ${response.json()}`, false);
handleSnackbar(`Failed to update Album with ID ${formData.get("id")}: ${JSON.stringify(response)}`, false);
})
.catch(error => {handleSnackbar(`Failed to update Album with ID ${formData.get("id")}: ${error.json()}`, false);});
.catch(error => {handleSnackbar(`Failed to update Album with ID ${formData.get("id")}: ${JSON.stringify(error)}`, false);});
}
revalidateAlbums();
const data = await getAlbums();