Nouvelle interface
This commit is contained in:
17
src/stores/global.js
Normal file
17
src/stores/global.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import {defineStore} from 'pinia'
|
||||
import Api from "@/services/Api.js";
|
||||
|
||||
export const useGlobalStore = defineStore('global', {
|
||||
state: () => ({
|
||||
gulliver: null
|
||||
}),
|
||||
getters: {
|
||||
numc: (state) => state.gulliver.numc,
|
||||
url : (state) => state.gulliver.url,
|
||||
},
|
||||
actions: {
|
||||
async registerSession(){
|
||||
this.gulliver = await Api.call('AdminController', 'getSession')
|
||||
}
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user