this.openedModal.close()
}
- async banUser () {
+ banUser () {
const reason = this.form.value['reason'] || undefined
this.userService.banUsers(this.usersToBan, reason)
- .subscribe(
- () => {
+ .subscribe({
+ next: () => {
const message = Array.isArray(this.usersToBan)
? $localize`${this.usersToBan.length} users banned.`
: $localize`User ${this.usersToBan.username} banned.`
this.hide()
},
- err => this.notifier.error(err.message)
- )
+ error: err => this.notifier.error(err.message)
+ })
}
}