]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/video-watch/video-watch.component.ts
Format video blacklist
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / video-watch / video-watch.component.ts
index f582df45cdf4950ca410eba7fc2d8763b71560bc..07b2a1d1f30736f80823c0683500901bef2ef8dc 100644 (file)
@@ -171,41 +171,43 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
 
   removeVideo(event: Event) {
     event.preventDefault();
+
     this.confirmService.confirm('Do you really want to delete this video?', 'Delete').subscribe(
       res => {
         if (res === false) return;
 
         this.videoService.removeVideo(this.video.id)
-                        .subscribe(
-                          status => {
-                            this.notificationsService.success('Success', `Video ${this.video.name} deleted.`)
-                            // Go back to the video-list.
-                            this.router.navigate(['/videos/list'])
-                          },
-
-                          error => this.notificationsService.error('Error', error.text)
-        );
+                         .subscribe(
+                           status => {
+                             this.notificationsService.success('Success', `Video ${this.video.name} deleted.`);
+                             // Go back to the video-list.
+                             this.router.navigate(['/videos/list']);
+                           },
+
+                           error => this.notificationsService.error('Error', error.text)
+                          );
       }
     );
   }
 
   blacklistVideo(event: Event) {
-    event.preventDefault()
+    event.preventDefault();
+
     this.confirmService.confirm('Do you really want to blacklist this video ?', 'Blacklist').subscribe(
       res => {
-       if (res === false) return;
+        if (res === false) return;
 
-       this.videoService.blacklistVideo(this.video.id)
-                        .subscribe(
-                          status => {
-                            this.notificationsService.success('Success', `Video ${this.video.name} had been blacklisted.`)
-                            this.router.navigate(['/videos/list'])
-                          },
+        this.videoService.blacklistVideo(this.video.id)
+                         .subscribe(
+                           status => {
+                             this.notificationsService.success('Success', `Video ${this.video.name} had been blacklisted.`);
+                             this.router.navigate(['/videos/list']);
+                           },
 
-                          error => this.notificationsService.error('Error', error.text)
-       )
+                           error => this.notificationsService.error('Error', error.text)
+                         );
       }
-    )
+    );
   }
 
   showReportModal(event: Event) {