mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 13:24:24 +00:00
17 lines
508 B
JavaScript
17 lines
508 B
JavaScript
import { defineStore } from "pinia";
|
|
|
|
export const useUserStore = defineStore ( 'user', {
|
|
state: () => ( { 'isUserAuth': true, 'isAdminAuth': true, 'userPermissions': {} } ),
|
|
getters: {
|
|
getUserAuthenticated: ( state ) => state.isUserAuth,
|
|
getAdminAuthenticated: ( state ) => state.isAdminAuth,
|
|
},
|
|
actions: {
|
|
setUserAuth ( auth ) {
|
|
this.isUserAuth = auth;
|
|
},
|
|
setAdminAuth ( auth ) {
|
|
this.isAdminAuth = auth;
|
|
}
|
|
}
|
|
} ); |