Pushing errors back to frontend
All checks were successful
Music Collection CI Workflow / test (./backend) (push) Successful in 34s
Music Collection CI Workflow / test (./frontend) (push) Successful in 38s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 51s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m49s
Music Collection CI Workflow / deploy (push) Successful in 23s
All checks were successful
Music Collection CI Workflow / test (./backend) (push) Successful in 34s
Music Collection CI Workflow / test (./frontend) (push) Successful in 38s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 51s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m49s
Music Collection CI Workflow / deploy (push) Successful in 23s
This commit is contained in:
parent
789d241769
commit
4335aaf85c
@ -47,14 +47,15 @@ export default function Page() {
|
||||
try {
|
||||
if (formData.get('id') == "") {
|
||||
const result = createAlbum(formData)
|
||||
.then(respose => {return response.json()})
|
||||
.catch(error => {response.json()});
|
||||
.then(response => {return response.json()})
|
||||
.catch(error => {return error.json()});
|
||||
handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${result}`, true);
|
||||
} else {
|
||||
const result = await updateAlbum(formData)
|
||||
.then(respose => {return response.json()})
|
||||
.catch(error => {response.json()});
|
||||
const result = updateAlbum(formData)
|
||||
.then(response => {return response.json()})
|
||||
.catch(error => {return error.json()});
|
||||
handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${result}`, true);
|
||||
}
|
||||
handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${result}`, true);
|
||||
revalidateAlbums();
|
||||
const data = await getAlbums();
|
||||
setAlbums(data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user