This commit is contained in:
tidusjar 2020-10-11 00:07:15 +01:00
parent 0afe5de211
commit d54471b6e8

View file

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