Implement logout

Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
William Brawner 2020-02-19 20:19:13 -07:00
parent a473f58d22
commit 606bcec932
2 changed files with 4 additions and 2 deletions

View file

@ -33,7 +33,9 @@ export class AppComponent {
} }
logout(): void { logout(): void {
this.twigsService.logout(); this.twigsService.logout().subscribe(_ => {
this.location.go('/');
});
} }
isLoggedIn() { isLoggedIn() {

View file

@ -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