]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/users/users.ts
add blocked filter in users list to filter banned users
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / users / users.ts
index 766189dfe07cf4ccc745b8140bf3d4958a73d629..9f193680d2400f7f8b3f6a8ee5be9ab96f3f4c35 100644 (file)
@@ -29,7 +29,7 @@ function createUser (parameters: CreateUserArgs) {
     videoQuota = 1000000,
     videoQuotaDaily = -1,
     role = UserRole.USER,
-    specialStatus = 201
+    specialStatus = 200
   } = parameters
 
   const path = '/api/v1/users'
@@ -164,14 +164,23 @@ function getUsersList (url: string, accessToken: string) {
           .expect('Content-Type', /json/)
 }
 
-function getUsersListPaginationAndSort (url: string, accessToken: string, start: number, count: number, sort: string, search?: string) {
+function getUsersListPaginationAndSort (
+  url: string,
+  accessToken: string,
+  start: number,
+  count: number,
+  sort: string,
+  search?: string,
+  blocked?: boolean
+) {
   const path = '/api/v1/users'
 
   const query = {
     start,
     count,
     sort,
-    search
+    search,
+    blocked
   }
 
   return request(url)