|
|
|
@ -195,7 +195,7 @@ export class MovieRequestsComponent implements OnInit {
|
|
|
|
|
private approveRequest(request: IMovieRequests) {
|
|
|
|
|
this.requestService.approveMovie({ id: request.id })
|
|
|
|
|
.subscribe(x => {
|
|
|
|
|
|
|
|
|
|
request.approved = true;
|
|
|
|
|
if (x.result) {
|
|
|
|
|
this.notificationService.success(
|
|
|
|
|
`Request for ${request.title} has been approved successfully`);
|
|
|
|
@ -206,6 +206,20 @@ export class MovieRequestsComponent implements OnInit {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private denyRequest(request: IMovieRequests) {
|
|
|
|
|
this.requestService.denyMovie({ id: request.id })
|
|
|
|
|
.subscribe(x => {
|
|
|
|
|
request.denied = true;
|
|
|
|
|
if (x.result) {
|
|
|
|
|
this.notificationService.success(
|
|
|
|
|
`Request for ${request.title} has been denied successfully`);
|
|
|
|
|
} else {
|
|
|
|
|
this.notificationService.warning("Request Denied", x.message ? x.message : x.errorMessage);
|
|
|
|
|
request.denied = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private loadInit() {
|
|
|
|
|
this.requestService.getMovieRequests(this.amountToLoad, 0)
|
|
|
|
|
.subscribe(x => {
|
|
|
|
|