From 98ab5dc81048d47d08a231f17698128f959e59b2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 25 Aug 2021 16:14:11 +0200 Subject: Remove useless async --- .../app/shared/shared-abuse-list/moderation-comment-modal.component.ts | 2 +- client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts | 3 ++- client/src/app/shared/shared-moderation/user-ban-modal.component.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts index ccb0c5262..2600da8da 100644 --- a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts +++ b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts @@ -49,7 +49,7 @@ export class ModerationCommentModalComponent extends FormReactive implements OnI this.form.reset() } - async banUser () { + banUser () { const moderationComment: string = this.form.value['moderationComment'] this.abuseService.updateAbuse(this.abuseToComment, { moderationComment }) diff --git a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts index e7e34ce1e..a8cc9b593 100644 --- a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts +++ b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts @@ -84,8 +84,9 @@ export class TopMenuDropdownComponent implements OnInit, OnDestroy { this.modalService.open(this.modal, { centered: true, - beforeDismiss: async () => { + beforeDismiss: () => { this.onModalDismiss() + return true } }) diff --git a/client/src/app/shared/shared-moderation/user-ban-modal.component.ts b/client/src/app/shared/shared-moderation/user-ban-modal.component.ts index 0a2d5e93a..a03bd7286 100644 --- a/client/src/app/shared/shared-moderation/user-ban-modal.component.ts +++ b/client/src/app/shared/shared-moderation/user-ban-modal.component.ts @@ -43,7 +43,7 @@ export class UserBanModalComponent extends FormReactive implements OnInit { this.openedModal.close() } - async banUser () { + banUser () { const reason = this.form.value['reason'] || undefined this.userService.banUsers(this.usersToBan, reason) -- cgit v1.2.3