diff options
Diffstat (limited to 'client/app/users/shared/user.model.ts')
-rw-r--r-- | client/app/users/shared/user.model.ts | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/client/app/users/shared/user.model.ts b/client/app/users/shared/user.model.ts deleted file mode 100644 index ca0a5f26c..000000000 --- a/client/app/users/shared/user.model.ts +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | import { Token } from './token.model'; | ||
2 | |||
3 | export class User { | ||
4 | username: string; | ||
5 | token: Token; | ||
6 | |||
7 | static load() { | ||
8 | return new User(localStorage.getItem('username'), Token.load()); | ||
9 | } | ||
10 | |||
11 | constructor(username: string, hash_token: any) { | ||
12 | this.username = username; | ||
13 | this.token = new Token(hash_token); | ||
14 | } | ||
15 | |||
16 | save() { | ||
17 | localStorage.setItem('username', this.username); | ||
18 | this.token.save(); | ||
19 | } | ||
20 | } | ||