Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
created logout logic in profile-menu.component.ts and implemented int…
Browse files Browse the repository at this point in the history
…o profile-menu.component.html
  • Loading branch information
HaventSlept committed May 14, 2024
1 parent 1ec9af9 commit 15da102
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<mat-icon>settings</mat-icon>
Einstellungen
</button>
<button mat-menu-item>
<button mat-menu-item (click)="logout()">
<mat-icon>logout</mat-icon>
Abmelden
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {User} from "../../../../model/user";
import {MatDialog, MatDialogConfig} from "@angular/material/dialog";
import {EventCreationComponent} from "../../../eventcreation/event-creation.component";
import {UserSettingsComponent} from "../../user-settings/user-settings.component";
import {environment} from "../../../../environment/environment";

@Component({
selector: 'app-profile-menu',
Expand Down Expand Up @@ -34,4 +35,9 @@ export class ProfileMenuComponent {
width: "600px"
});
}

logout() {
console.log(environment.api);
window.open(environment.api+'/logout','_self');
}
}

0 comments on commit 15da102

Please sign in to comment.