Skip to content
Snippets Groups Projects
Verified Commit 5086d5bc authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #8758 add logout

parent 8e742d3f
No related branches found
No related tags found
No related merge requests found
<nav class="sidebar" *ngIf="snavLeftComponent.opened">
<div class="main-header">
<header class="profile-header">
<button class="logout-button" mat-icon-button routerLink="/login">
<button class="logout-button" mat-icon-button (click)="logout()">
<mat-icon fontSet="fas" fontIcon="fa-sign-out-alt"></mat-icon>
</button>
<div class="user">
......
......@@ -78,4 +78,13 @@ export class SidebarComponent implements OnInit, AfterViewInit {
this.snavLeftComponent.close();
this.snavRightComponent.open();
}
logout() {
this.http.get('../rest/logout')
.subscribe((data: any) => {
this.router.navigate(['/login']);
}, (err: any) => {
this.notificationService.handleErrors(err);
});
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment