Components/create-modal: show toast on error

This commit is contained in:
Toast 2025-02-04 09:52:53 +01:00
parent 42aa436e81
commit 59ae90e88b

View file

@ -44,8 +44,12 @@ export class CreateModalComponent {
let newId: string;
this.showsService.sendShow(show).subscribe({
next: (response: ShowsApiCreation) => {
newId = response.newId;
}, error: (err: any) => {
newId = response.newId
}, error: err => {
this.toastService.show({
body: "Could not add show!",
htmlClass: "bg-danger text-light"
})
console.error(err)
}, complete: () => {
this.toastService.show({