aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts')
-rw-r--r--client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts21
1 files changed, 9 insertions, 12 deletions
diff --git a/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts b/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts
index 56024b247..f4cf21259 100644
--- a/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts
+++ b/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts
@@ -31,22 +31,19 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit {
31 this.loadData() 31 this.loadData()
32 } 32 }
33 33
34 removeVideoFromBlacklist (entry: BlacklistedVideo) { 34 async removeVideoFromBlacklist (entry: BlacklistedVideo) {
35 const confirmMessage = 'Do you really want to remove this video from the blacklist ? It will be available again in the video list.' 35 const confirmMessage = 'Do you really want to remove this video from the blacklist ? It will be available again in the video list.'
36 36
37 this.confirmService.confirm(confirmMessage, 'Remove').subscribe( 37 const res = await this.confirmService.confirm(confirmMessage, 'Remove')
38 res => { 38 if (res === false) return
39 if (res === false) return
40 39
41 this.videoBlacklistService.removeVideoFromBlacklist(entry.videoId).subscribe( 40 this.videoBlacklistService.removeVideoFromBlacklist(entry.videoId).subscribe(
42 status => { 41 () => {
43 this.notificationsService.success('Success', `Video ${entry.name} removed from the blacklist.`) 42 this.notificationsService.success('Success', `Video ${entry.name} removed from the blacklist.`)
44 this.loadData() 43 this.loadData()
45 }, 44 },
46 45
47 err => this.notificationsService.error('Error', err.message) 46 err => this.notificationsService.error('Error', err.message)
48 )
49 }
50 ) 47 )
51 } 48 }
52 49