Components/create-modal: show toast on error
This commit is contained in:
parent
42aa436e81
commit
59ae90e88b
1 changed files with 6 additions and 2 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue