]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-users/user-admin.service.ts
Breaking API: Consistency with role id/label
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-users / user-admin.service.ts
index 422221d62f1f6b0d1b9873bc30ad94bcd6d53586..0b04023a31183183ec315bf0ee8158ce2399ef3b 100644 (file)
@@ -59,7 +59,6 @@ export class UserAdminService {
 
     return this.authHttp.get<ResultList<UserServerModel>>(UserService.BASE_USERS_URL, { params })
                .pipe(
-                 map(res => this.restExtractor.convertResultListDateToHuman(res)),
                  map(res => this.restExtractor.applyToResultListData(res, this.formatUser.bind(this))),
                  catchError(err => this.restExtractor.handleError(err))
                )
@@ -126,7 +125,10 @@ export class UserAdminService {
     }
 
     return Object.assign(user, {
-      roleLabel: roleLabels[user.role],
+      role: {
+        id: user.role.id,
+        label: roleLabels[user.role.id]
+      },
       videoQuota,
       videoQuotaUsed,
       rawVideoQuota: user.videoQuota,