Fixing messages
Some checks failed
Music Collection CI Workflow / test (./backend) (push) Successful in 37s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Has been cancelled
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Has been cancelled
Music Collection CI Workflow / deploy (push) Has been cancelled
Music Collection CI Workflow / test (./frontend) (push) Has been cancelled

This commit is contained in:
Phill Pover 2025-04-07 12:17:27 +01:00
parent 1520dfe4ba
commit 2cc02e2e71
2 changed files with 2 additions and 3 deletions

View File

@ -81,7 +81,6 @@ export async function updateAlbum(formData: FormData) {
const title = formData.get('title');
const artist = formData.get('artist');
const genre = formData.get('genre');
console.log(id,title,artist,genre);
return fetch(`https://api.anatid.net/album/${id}`, {
method: "PUT",
headers: { "Content-Type": "application/json" },

View File

@ -51,7 +51,7 @@ export default function Page() {
if (response.ok) {
handleSnackbar(`Successfully created Album with ID ${formData.get("id")}: ${response}`, true);
}
Promise.reject(response);
handleSnackbar(`Failed to create Album with ID ${formData.get("id")}: ${response}`, false);
})
.catch(error => {handleSnackbar(`Failed to create Album with ID ${formData.get("id")}: ${error}`, false);});
} else {
@ -60,7 +60,7 @@ export default function Page() {
if (response.ok) {
handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${response}`, true);
}
Promise.reject(response);
handleSnackbar(`Failed to update Album with ID ${formData.get("id")}: ${response}`, false);
})
.catch(error => {handleSnackbar(`Failed to update Album with ID ${formData.get("id")}: ${error}`, false);});
}