aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-27 13:44:40 +0200
committerChocobozzz <me@florianbigard.com>2022-07-27 13:52:13 +0200
commite3d6c6434f570f77c0532f86c82f78bcafb399ec (patch)
tree65d525f42c8cf55aba871093b3dd65964f5cd967 /client/src/app/shared/shared-users
parent073deef8862f462de5f159a57877ef415ebe4c69 (diff)
downloadPeerTube-e3d6c6434f570f77c0532f86c82f78bcafb399ec.tar.gz
PeerTube-e3d6c6434f570f77c0532f86c82f78bcafb399ec.tar.zst
PeerTube-e3d6c6434f570f77c0532f86c82f78bcafb399ec.zip
Add bulk action on following/followers
Diffstat (limited to 'client/src/app/shared/shared-users')
-rw-r--r--client/src/app/shared/shared-users/user-admin.service.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/app/shared/shared-users/user-admin.service.ts b/client/src/app/shared/shared-users/user-admin.service.ts
index 3db271c4a..422221d62 100644
--- a/client/src/app/shared/shared-users/user-admin.service.ts
+++ b/client/src/app/shared/shared-users/user-admin.service.ts
@@ -5,6 +5,7 @@ import { HttpClient, HttpParams } from '@angular/common/http'
5import { Injectable } from '@angular/core' 5import { Injectable } from '@angular/core'
6import { RestExtractor, RestPagination, RestService, UserService } from '@app/core' 6import { RestExtractor, RestPagination, RestService, UserService } from '@app/core'
7import { getBytes } from '@root-helpers/bytes' 7import { getBytes } from '@root-helpers/bytes'
8import { arrayify } from '@shared/core-utils'
8import { ResultList, User as UserServerModel, UserCreate, UserRole, UserUpdate } from '@shared/models' 9import { ResultList, User as UserServerModel, UserCreate, UserRole, UserUpdate } from '@shared/models'
9 10
10@Injectable() 11@Injectable()
@@ -65,7 +66,7 @@ export class UserAdminService {
65 } 66 }
66 67
67 removeUser (usersArg: UserServerModel | UserServerModel[]) { 68 removeUser (usersArg: UserServerModel | UserServerModel[]) {
68 const users = Array.isArray(usersArg) ? usersArg : [ usersArg ] 69 const users = arrayify(usersArg)
69 70
70 return from(users) 71 return from(users)
71 .pipe( 72 .pipe(
@@ -77,7 +78,7 @@ export class UserAdminService {
77 78
78 banUsers (usersArg: UserServerModel | UserServerModel[], reason?: string) { 79 banUsers (usersArg: UserServerModel | UserServerModel[], reason?: string) {
79 const body = reason ? { reason } : {} 80 const body = reason ? { reason } : {}
80 const users = Array.isArray(usersArg) ? usersArg : [ usersArg ] 81 const users = arrayify(usersArg)
81 82
82 return from(users) 83 return from(users)
83 .pipe( 84 .pipe(
@@ -88,7 +89,7 @@ export class UserAdminService {
88 } 89 }
89 90
90 unbanUsers (usersArg: UserServerModel | UserServerModel[]) { 91 unbanUsers (usersArg: UserServerModel | UserServerModel[]) {
91 const users = Array.isArray(usersArg) ? usersArg : [ usersArg ] 92 const users = arrayify(usersArg)
92 93
93 return from(users) 94 return from(users)
94 .pipe( 95 .pipe(