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 {
|
logout(): void {
|
||||||
this.twigsService.logout();
|
this.twigsService.logout().subscribe(_ => {
|
||||||
|
this.location.go('/');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
isLoggedIn() {
|
isLoggedIn() {
|
||||||
|
|
|
@ -43,7 +43,7 @@ export class TwigsHttpService implements TwigsService {
|
||||||
}
|
}
|
||||||
|
|
||||||
logout(): Observable<void> {
|
logout(): Observable<void> {
|
||||||
return Observable.throw('Not Implemented');
|
return this.http.post<void>(this.apiUrl + '/logout', this.options);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Budgets
|
// Budgets
|
||||||
|
|
Loading…
Reference in a new issue