]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/users/user.service.ts
Use random port for mock servers in tests
[github/Chocobozzz/PeerTube.git] / client / src / app / core / users / user.service.ts
index 33cc1f668d13138bdfb8412b1edc2d96e8fe4b69..47db985e12f00036234131e7b665a5b5b3efc005 100644 (file)
@@ -7,8 +7,7 @@ import { AuthService } from '@app/core/auth'
 import { getBytes } from '@root-helpers/bytes'
 import { UserLocalStorageKeys } from '@root-helpers/users'
 import {
-  Avatar,
-  NSFWPolicyType,
+  ActorImage,
   ResultList,
   User as UserServerModel,
   UserCreate,
@@ -136,7 +135,7 @@ export class UserService {
   changeAvatar (avatarForm: FormData) {
     const url = UserService.BASE_USERS_URL + 'me/avatar/pick'
 
-    return this.authHttp.post<{ avatar: Avatar }>(url, avatarForm)
+    return this.authHttp.post<{ avatar: ActorImage }>(url, avatarForm)
                .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
@@ -321,13 +320,7 @@ export class UserService {
       const filters = this.restService.parseQueryStringFilter(search, {
         blocked: {
           prefix: 'banned:',
-          isBoolean: true,
-          handler: v => {
-            if (v === 'true') return v
-            if (v === 'false') return v
-
-            return undefined
-          }
+          isBoolean: true
         }
       })