X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fusers%2Fuser.service.ts;h=cc5c051f173b040386ba9897a6541d0154da0c04;hb=fc2ec87a8c4dcfbb91a1a62cf4c07a2a8e6a50fe;hp=27a81f0a249e68bf0f1ed80672f2cade52b2e3c0;hpb=04b8c3fba614efc3827f583096c78b08cb668470;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/users/user.service.ts b/client/src/app/shared/users/user.service.ts index 27a81f0a2..cc5c051f1 100644 --- a/client/src/app/shared/users/user.service.ts +++ b/client/src/app/shared/users/user.service.ts @@ -153,6 +153,15 @@ export class UserService { ) } + updateUsers (users: User[], userUpdate: UserUpdate) { + return from(users) + .pipe( + concatMap(u => this.authHttp.put(UserService.BASE_USERS_URL + u.id, userUpdate)), + toArray(), + catchError(err => this.restExtractor.handleError(err)) + ) + } + getUser (userId: number) { return this.authHttp.get(UserService.BASE_USERS_URL + userId) .pipe(catchError(err => this.restExtractor.handleError(err)))