diff options
Diffstat (limited to 'client/src/app/core/users')
-rw-r--r-- | client/src/app/core/users/user-local-storage.service.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/client/src/app/core/users/user-local-storage.service.ts b/client/src/app/core/users/user-local-storage.service.ts index fff649eef..f1588bdd2 100644 --- a/client/src/app/core/users/user-local-storage.service.ts +++ b/client/src/app/core/users/user-local-storage.service.ts | |||
@@ -4,7 +4,7 @@ import { Injectable } from '@angular/core' | |||
4 | import { AuthService, AuthStatus } from '@app/core/auth' | 4 | import { AuthService, AuthStatus } from '@app/core/auth' |
5 | import { getBoolOrDefault } from '@root-helpers/local-storage-utils' | 5 | import { getBoolOrDefault } from '@root-helpers/local-storage-utils' |
6 | import { logger } from '@root-helpers/logger' | 6 | import { logger } from '@root-helpers/logger' |
7 | import { UserLocalStorageKeys, UserTokens } from '@root-helpers/users' | 7 | import { UserLocalStorageKeys, OAuthUserTokens } from '@root-helpers/users' |
8 | import { UserRole, UserUpdateMe } from '@shared/models' | 8 | import { UserRole, UserUpdateMe } from '@shared/models' |
9 | import { NSFWPolicyType } from '@shared/models/videos' | 9 | import { NSFWPolicyType } from '@shared/models/videos' |
10 | import { ServerService } from '../server' | 10 | import { ServerService } from '../server' |
@@ -24,7 +24,7 @@ export class UserLocalStorageService { | |||
24 | 24 | ||
25 | this.setLoggedInUser(user) | 25 | this.setLoggedInUser(user) |
26 | this.setUserInfo(user) | 26 | this.setUserInfo(user) |
27 | this.setTokens(user.tokens) | 27 | this.setTokens(user.oauthTokens) |
28 | } | 28 | } |
29 | }) | 29 | }) |
30 | 30 | ||
@@ -43,7 +43,7 @@ export class UserLocalStorageService { | |||
43 | next: () => { | 43 | next: () => { |
44 | const user = this.authService.getUser() | 44 | const user = this.authService.getUser() |
45 | 45 | ||
46 | this.setTokens(user.tokens) | 46 | this.setTokens(user.oauthTokens) |
47 | } | 47 | } |
48 | }) | 48 | }) |
49 | } | 49 | } |
@@ -174,14 +174,14 @@ export class UserLocalStorageService { | |||
174 | // --------------------------------------------------------------------------- | 174 | // --------------------------------------------------------------------------- |
175 | 175 | ||
176 | getTokens () { | 176 | getTokens () { |
177 | return UserTokens.getUserTokens(this.localStorageService) | 177 | return OAuthUserTokens.getUserTokens(this.localStorageService) |
178 | } | 178 | } |
179 | 179 | ||
180 | setTokens (tokens: UserTokens) { | 180 | setTokens (tokens: OAuthUserTokens) { |
181 | UserTokens.saveToLocalStorage(this.localStorageService, tokens) | 181 | OAuthUserTokens.saveToLocalStorage(this.localStorageService, tokens) |
182 | } | 182 | } |
183 | 183 | ||
184 | flushTokens () { | 184 | flushTokens () { |
185 | UserTokens.flushLocalStorage(this.localStorageService) | 185 | OAuthUserTokens.flushLocalStorage(this.localStorageService) |
186 | } | 186 | } |
187 | } | 187 | } |