aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/users/user.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/core/users/user.service.ts')
-rw-r--r--client/src/app/core/users/user.service.ts12
1 files changed, 5 insertions, 7 deletions
diff --git a/client/src/app/core/users/user.service.ts b/client/src/app/core/users/user.service.ts
index 6e7a48519..01c9be5bf 100644
--- a/client/src/app/core/users/user.service.ts
+++ b/client/src/app/core/users/user.service.ts
@@ -5,7 +5,6 @@ import { HttpClient, HttpParams } from '@angular/common/http'
5import { Injectable } from '@angular/core' 5import { Injectable } from '@angular/core'
6import { AuthService } from '@app/core/auth' 6import { AuthService } from '@app/core/auth'
7import { BytesPipe } from '@app/shared/shared-main' 7import { BytesPipe } from '@app/shared/shared-main'
8import { I18n } from '@ngx-translate/i18n-polyfill'
9import { UserLocalStorageKeys } from '@root-helpers/users' 8import { UserLocalStorageKeys } from '@root-helpers/users'
10import { 9import {
11 Avatar, 10 Avatar,
@@ -38,9 +37,8 @@ export class UserService {
38 private restExtractor: RestExtractor, 37 private restExtractor: RestExtractor,
39 private restService: RestService, 38 private restService: RestService,
40 private localStorageService: LocalStorageService, 39 private localStorageService: LocalStorageService,
41 private sessionStorageService: SessionStorageService, 40 private sessionStorageService: SessionStorageService
42 private i18n: I18n 41 ) { }
43 ) { }
44 42
45 changePassword (currentPassword: string, newPassword: string) { 43 changePassword (currentPassword: string, newPassword: string) {
46 const url = UserService.BASE_USERS_URL + 'me' 44 const url = UserService.BASE_USERS_URL + 'me'
@@ -383,9 +381,9 @@ export class UserService {
383 } 381 }
384 382
385 const roleLabels: { [ id in UserRole ]: string } = { 383 const roleLabels: { [ id in UserRole ]: string } = {
386 [UserRole.USER]: this.i18n('User'), 384 [UserRole.USER]: $localize`User`,
387 [UserRole.ADMINISTRATOR]: this.i18n('Administrator'), 385 [UserRole.ADMINISTRATOR]: $localize`Administrator`,
388 [UserRole.MODERATOR]: this.i18n('Moderator') 386 [UserRole.MODERATOR]: $localize`Moderator`
389 } 387 }
390 388
391 return Object.assign(user, { 389 return Object.assign(user, {