Fixing messages
Some checks failed
Music Collection CI Workflow / test (./frontend) (push) Has been cancelled
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 (./backend) (push) Has been cancelled
Some checks failed
Music Collection CI Workflow / test (./frontend) (push) Has been cancelled
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 (./backend) (push) Has been cancelled
This commit is contained in:
parent
6d7f3b4094
commit
7530b2300c
@ -49,22 +49,20 @@ export default function Page() {
|
||||
const result = await createAlbum(formData)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
return response
|
||||
handleSnackbar(`Successfully created Album with ID ${formData.get("id")}: ${result}`, true);
|
||||
}
|
||||
Promise.reject(response);
|
||||
})
|
||||
.catch(error => {return error});
|
||||
handleSnackbar(`Successfully created Album with ID ${formData.get("id")}: ${result}`, true);
|
||||
.catch(error => {handleSnackbar(`Failed to create Album with ID ${formData.get("id")}: ${result}`, true);});
|
||||
} else {
|
||||
const result = await updateAlbum(formData)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
return response
|
||||
return handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${result}`, true);
|
||||
}
|
||||
Promise.reject(response);
|
||||
})
|
||||
.catch(error => {return error});
|
||||
handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${result}`, true);
|
||||
.catch(error => {handleSnackbar(`Failed to update Album with ID ${formData.get("id")}: ${result}`, false);});
|
||||
}
|
||||
revalidateAlbums();
|
||||
const data = await getAlbums();
|
||||
|
Loading…
x
Reference in New Issue
Block a user