Fixing if/elses
Some checks failed
Music Collection CI Workflow / test (./backend) (push) Successful in 37s
Music Collection CI Workflow / test (./frontend) (push) Failing after 37s
Music Collection CI Workflow / deploy (push) Has been skipped
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Has been skipped
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Has been skipped
Some checks failed
Music Collection CI Workflow / test (./backend) (push) Successful in 37s
Music Collection CI Workflow / test (./frontend) (push) Failing after 37s
Music Collection CI Workflow / deploy (push) Has been skipped
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Has been skipped
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Has been skipped
This commit is contained in:
parent
22c6bea333
commit
3fb2053146
@ -54,16 +54,18 @@ export default function Page() {
|
|||||||
await createSong(formData).then(response => {
|
await createSong(formData).then(response => {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
handleSnackbar(`Successfully created Song with ID ${formData.get("id")}: ${JSON.stringify(response)}`, true);
|
handleSnackbar(`Successfully created Song with ID ${formData.get("id")}: ${JSON.stringify(response)}`, true);
|
||||||
|
} else
|
||||||
|
handleSnackbar(`Failed to create Song with ID ${formData.get("id")}: ${JSON.stringify(response)}`, false);
|
||||||
}
|
}
|
||||||
handleSnackbar(`Failed to create Song with ID ${formData.get("id")}: ${JSON.stringify(response)}`, false);
|
|
||||||
})
|
})
|
||||||
.catch(error => {handleSnackbar(`Failed to create Song with ID ${formData.get("id")}: ${JSON.stringify(error)}`, false);});
|
.catch(error => {handleSnackbar(`Failed to create Song with ID ${formData.get("id")}: ${JSON.stringify(error)}`, false);});
|
||||||
} else {
|
} else {
|
||||||
await updateSong(formData).then(response => {
|
await updateSong(formData).then(response => {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
handleSnackbar(`Successfully created Song with ID ${formData.get("id")}: ${JSON.stringify(response)}`, true);
|
handleSnackbar(`Successfully created Song with ID ${formData.get("id")}: ${JSON.stringify(response)}`, true);
|
||||||
|
} else {
|
||||||
|
handleSnackbar(`Failed to create Song with ID ${formData.get("id")}: ${JSON.stringify(response)}`, false);
|
||||||
}
|
}
|
||||||
handleSnackbar(`Failed to create Song with ID ${formData.get("id")}: ${JSON.stringify(response)}`, false);
|
|
||||||
})
|
})
|
||||||
.catch(error => {handleSnackbar(`Failed to create Song with ID ${formData.get("id")}: ${JSON.stringify(error)}`, false);});
|
.catch(error => {handleSnackbar(`Failed to create Song with ID ${formData.get("id")}: ${JSON.stringify(error)}`, false);});
|
||||||
}
|
}
|
||||||
|
@ -50,8 +50,9 @@ export default function Page() {
|
|||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
handleSnackbar(`Successfully created Album with ID ${formData.get("id")}: ${JSON.stringify(response)}`, true);
|
handleSnackbar(`Successfully created Album with ID ${formData.get("id")}: ${JSON.stringify(response)}`, true);
|
||||||
|
} else {
|
||||||
|
handleSnackbar(`Failed to create Album with ID ${formData.get("id")}: ${JSON.stringify(response)}`, 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")}: ${JSON.stringify(error)}`, false);});
|
.catch(error => {handleSnackbar(`Failed to create Album with ID ${formData.get("id")}: ${JSON.stringify(error)}`, false);});
|
||||||
} else {
|
} else {
|
||||||
@ -59,8 +60,9 @@ export default function Page() {
|
|||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${JSON.stringify(response)}`, true);
|
handleSnackbar(`Successfully updated Album with ID ${formData.get("id")}: ${JSON.stringify(response)}`, true);
|
||||||
|
} else {
|
||||||
|
handleSnackbar(`Failed to update Album with ID ${formData.get("id")}: ${JSON.stringify(response)}`, 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")}: ${JSON.stringify(error)}`, false);});
|
.catch(error => {handleSnackbar(`Failed to update Album with ID ${formData.get("id")}: ${JSON.stringify(error)}`, false);});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user