Implement logout
Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
parent
a473f58d22
commit
606bcec932
2 changed files with 4 additions and 2 deletions
|
@ -33,7 +33,9 @@ export class AppComponent {
|
|||
}
|
||||
|
||||
logout(): void {
|
||||
this.twigsService.logout();
|
||||
this.twigsService.logout().subscribe(_ => {
|
||||
this.location.go('/');
|
||||
});
|
||||
}
|
||||
|
||||
isLoggedIn() {
|
||||
|
|
|
@ -43,7 +43,7 @@ export class TwigsHttpService implements TwigsService {
|
|||
}
|
||||
|
||||
logout(): Observable<void> {
|
||||
return Observable.throw('Not Implemented');
|
||||
return this.http.post<void>(this.apiUrl + '/logout', this.options);
|
||||
}
|
||||
|
||||
// Budgets
|
||||
|
|
Loading…
Reference in a new issue