diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-05-27 16:23:10 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-05-27 16:23:10 +0200 |
commit | 41a2aee38cf812510010da09de9bae53590ec119 (patch) | |
tree | 79d55d6ae0ef6f66ccb88890cf1ef1946dc65fb4 /client/angular/users/models/user.ts | |
parent | 157cb9c9713e08ff70078660a32dd77ecb87eabc (diff) | |
download | PeerTube-41a2aee38cf812510010da09de9bae53590ec119.tar.gz PeerTube-41a2aee38cf812510010da09de9bae53590ec119.tar.zst PeerTube-41a2aee38cf812510010da09de9bae53590ec119.zip |
Follow the angular styleguide for the directories structure
Diffstat (limited to 'client/angular/users/models/user.ts')
-rw-r--r-- | client/angular/users/models/user.ts | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/client/angular/users/models/user.ts b/client/angular/users/models/user.ts deleted file mode 100644 index 3367e3bb5..000000000 --- a/client/angular/users/models/user.ts +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | import { Token } from './token'; | ||
2 | |||
3 | export class User { | ||
4 | username: string; | ||
5 | token: Token; | ||
6 | |||
7 | static load(): User { | ||
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(): void { | ||
17 | localStorage.setItem('username', this.username); | ||
18 | this.token.save(); | ||
19 | } | ||
20 | } | ||