aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/angular/users/models/user.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/angular/users/models/user.ts')
-rw-r--r--client/angular/users/models/user.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/client/angular/users/models/user.ts b/client/angular/users/models/user.ts
index 2c56a6132..3367e3bb5 100644
--- a/client/angular/users/models/user.ts
+++ b/client/angular/users/models/user.ts
@@ -4,15 +4,15 @@ export class User {
4 username: string; 4 username: string;
5 token: Token; 5 token: Token;
6 6
7 static load(): User {
8 return new User(localStorage.getItem('username'), Token.load());
9 }
10
7 constructor (username: string, hash_token: any) { 11 constructor (username: string, hash_token: any) {
8 this.username = username; 12 this.username = username;
9 this.token = new Token(hash_token); 13 this.token = new Token(hash_token);
10 } 14 }
11 15
12 static load(): User {
13 return new User(localStorage.getItem('username'), Token.load());
14 }
15
16 save(): void { 16 save(): void {
17 localStorage.setItem('username', this.username); 17 localStorage.setItem('username', this.username);
18 this.token.save(); 18 this.token.save();