pull/3816/head
tidusjar 4 years ago
parent 0afe5de211
commit d54471b6e8

@ -115,11 +115,12 @@ export class MovieDetailsComponent {
} }
public async approve() { public async approve() {
this.movie.approved = true;
const result = await this.requestService.approveMovie({ id: this.movieRequest.id }).toPromise(); const result = await this.requestService.approveMovie({ id: this.movieRequest.id }).toPromise();
if (result.result) { if (result.result) {
this.movie.approved = false;
this.messageService.send("Successfully Approved", "Ok"); this.messageService.send("Successfully Approved", "Ok");
} else { } else {
this.movie.approved = false;
this.messageService.send(result.errorMessage, "Ok"); this.messageService.send(result.errorMessage, "Ok");
} }
} }

Loading…
Cancel
Save