diff options
Diffstat (limited to 'ufund-ui/src/app/components/login')
-rw-r--r-- | ufund-ui/src/app/components/login/login.component.html | 1 | ||||
-rw-r--r-- | ufund-ui/src/app/components/login/login.component.ts | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ufund-ui/src/app/components/login/login.component.html b/ufund-ui/src/app/components/login/login.component.html index 743b1b3..e1c3e2a 100644 --- a/ufund-ui/src/app/components/login/login.component.html +++ b/ufund-ui/src/app/components/login/login.component.html @@ -1,5 +1,4 @@ <div id="box"> - <span *ngIf="next" style="color: red">You must be logged in to view this page</span> <h1>Login</h1> <input placeholder="Username" type="text" #username> <input placeholder="Password" type="password" #password> diff --git a/ufund-ui/src/app/components/login/login.component.ts b/ufund-ui/src/app/components/login/login.component.ts index f6a2996..4dcaedd 100644 --- a/ufund-ui/src/app/components/login/login.component.ts +++ b/ufund-ui/src/app/components/login/login.component.ts @@ -35,6 +35,8 @@ export class LoginComponent implements OnInit { this.authService.login(username, password).then(() => { this.router.navigate([next]); + let key = this.authService.getApiKey() + localStorage.setItem("credential", JSON.stringify({username: username, key: key})) }).catch(ex => { this.statusText.next("Unable to login: " + friendlyHttpStatus[ex.status]) console.log(ex) |