Components/create-edit-modal: return new show instead of id on creation
This commit is contained in:
parent
b52a8af0bf
commit
77be63e88f
2 changed files with 4 additions and 14 deletions
|
|
@ -48,17 +48,8 @@ export class ShowsComponent {
|
|||
|
||||
createNewShow() {
|
||||
this.modalService.open(CreateEditModalComponent).result.then(
|
||||
(result) => {
|
||||
console.log(`Result: ${result}`)
|
||||
|
||||
this.api.getShow(result).subscribe({
|
||||
next: (response: ShowsApiIdResponse) => {
|
||||
this.shows.push(response.show)
|
||||
}, error: (err: any) => {
|
||||
console.error(`Error: ${err}`)
|
||||
}, complete: () => {
|
||||
}
|
||||
})
|
||||
(result: Show) => {
|
||||
this.shows.push(result)
|
||||
},
|
||||
(result) => {
|
||||
// Dismissed, do nothing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue