]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts
Fix forgot password button role
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-abuse-list / moderation-comment-modal.component.ts
index 876aeea8a7eecb75471d97e4946733ef53aaa6ba..2600da8dad9505315a3cc4c549ffb2b2a4e7d32f 100644 (file)
@@ -49,20 +49,20 @@ export class ModerationCommentModalComponent extends FormReactive implements OnI
     this.form.reset()
   }
 
-  async banUser () {
-    const moderationComment: string = this.form.value[ 'moderationComment' ]
+  banUser () {
+    const moderationComment: string = this.form.value['moderationComment']
 
     this.abuseService.updateAbuse(this.abuseToComment, { moderationComment })
-        .subscribe(
-          () => {
+        .subscribe({
+          next: () => {
             this.notifier.success($localize`Comment updated.`)
 
             this.commentUpdated.emit(moderationComment)
             this.hide()
           },
 
-          err => this.notifier.error(err.message)
-        )
+          error: err => this.notifier.error(err.message)
+        })
   }
 
 }