feat(api): Get current session
This commit is contained in:
parent
656d7a9e3c
commit
83f32ea82a
|
@ -38,6 +38,10 @@ export const useMainStore = defineStore({
|
||||||
if (this.user === undefined) throw 'Not logged in, this should not be called';
|
if (this.user === undefined) throw 'Not logged in, this should not be called';
|
||||||
return this.user;
|
return this.user;
|
||||||
},
|
},
|
||||||
|
currentSession(): FG.Session {
|
||||||
|
if (this.session === undefined) throw 'Not logged in, this should not be called';
|
||||||
|
return this.session;
|
||||||
|
},
|
||||||
permissions(): string[] {
|
permissions(): string[] {
|
||||||
return this.user?.permissions || [];
|
return this.user?.permissions || [];
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue