diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-17 11:27:47 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-17 14:01:45 +0200 |
commit | 1378c0d343028f3d40d7d795422684ab9e6a1599 (patch) | |
tree | 08062b84a38a7e2dfe0aa674e7ca8e1b7321044e /client/src/app/+admin/users/user-list/user-list.component.ts | |
parent | c186a67f90203af6bfa434f026efdc99193bcd65 (diff) | |
download | PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.gz PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.zst PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.zip |
Fix client lint
Diffstat (limited to 'client/src/app/+admin/users/user-list/user-list.component.ts')
-rw-r--r-- | client/src/app/+admin/users/user-list/user-list.component.ts | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/client/src/app/+admin/users/user-list/user-list.component.ts b/client/src/app/+admin/users/user-list/user-list.component.ts index e3ae68a93..d4406549a 100644 --- a/client/src/app/+admin/users/user-list/user-list.component.ts +++ b/client/src/app/+admin/users/user-list/user-list.component.ts | |||
@@ -173,14 +173,14 @@ export class UserListComponent extends RestTable implements OnInit { | |||
173 | if (res === false) return | 173 | if (res === false) return |
174 | 174 | ||
175 | this.userService.unbanUsers(users) | 175 | this.userService.unbanUsers(users) |
176 | .subscribe( | 176 | .subscribe({ |
177 | () => { | 177 | next: () => { |
178 | this.notifier.success($localize`${users.length} users unbanned.`) | 178 | this.notifier.success($localize`${users.length} users unbanned.`) |
179 | this.reloadData() | 179 | this.reloadData() |
180 | }, | 180 | }, |
181 | 181 | ||
182 | err => this.notifier.error(err.message) | 182 | error: err => this.notifier.error(err.message) |
183 | ) | 183 | }) |
184 | } | 184 | } |
185 | 185 | ||
186 | async removeUsers (users: User[]) { | 186 | async removeUsers (users: User[]) { |
@@ -195,25 +195,27 @@ export class UserListComponent extends RestTable implements OnInit { | |||
195 | const res = await this.confirmService.confirm(message, $localize`Delete`) | 195 | const res = await this.confirmService.confirm(message, $localize`Delete`) |
196 | if (res === false) return | 196 | if (res === false) return |
197 | 197 | ||
198 | this.userService.removeUser(users).subscribe( | 198 | this.userService.removeUser(users) |
199 | () => { | 199 | .subscribe({ |
200 | this.notifier.success($localize`${users.length} users deleted.`) | 200 | next: () => { |
201 | this.reloadData() | 201 | this.notifier.success($localize`${users.length} users deleted.`) |
202 | }, | 202 | this.reloadData() |
203 | }, | ||
203 | 204 | ||
204 | err => this.notifier.error(err.message) | 205 | error: err => this.notifier.error(err.message) |
205 | ) | 206 | }) |
206 | } | 207 | } |
207 | 208 | ||
208 | async setEmailsAsVerified (users: User[]) { | 209 | async setEmailsAsVerified (users: User[]) { |
209 | this.userService.updateUsers(users, { emailVerified: true }).subscribe( | 210 | this.userService.updateUsers(users, { emailVerified: true }) |
210 | () => { | 211 | .subscribe({ |
211 | this.notifier.success($localize`${users.length} users email set as verified.`) | 212 | next: () => { |
212 | this.reloadData() | 213 | this.notifier.success($localize`${users.length} users email set as verified.`) |
213 | }, | 214 | this.reloadData() |
215 | }, | ||
214 | 216 | ||
215 | err => this.notifier.error(err.message) | 217 | error: err => this.notifier.error(err.message) |
216 | ) | 218 | }) |
217 | } | 219 | } |
218 | 220 | ||
219 | isInSelectionMode () { | 221 | isInSelectionMode () { |
@@ -227,13 +229,13 @@ export class UserListComponent extends RestTable implements OnInit { | |||
227 | pagination: this.pagination, | 229 | pagination: this.pagination, |
228 | sort: this.sort, | 230 | sort: this.sort, |
229 | search: this.search | 231 | search: this.search |
230 | }).subscribe( | 232 | }).subscribe({ |
231 | resultList => { | 233 | next: resultList => { |
232 | this.users = resultList.data | 234 | this.users = resultList.data |
233 | this.totalRecords = resultList.total | 235 | this.totalRecords = resultList.total |
234 | }, | 236 | }, |
235 | 237 | ||
236 | err => this.notifier.error(err.message) | 238 | error: err => this.notifier.error(err.message) |
237 | ) | 239 | }) |
238 | } | 240 | } |
239 | } | 241 | } |