some initial API refactoring
This commit is contained in:
parent
bd9fcf619d
commit
4a59c42395
20 changed files with 1368 additions and 1567 deletions
19
src/stores/credentials.js
Normal file
19
src/stores/credentials.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { defineStore } from 'pinia'
|
||||
|
||||
const defaultState = {
|
||||
credentials: null,
|
||||
}
|
||||
|
||||
export const useCredentialsStore = defineStore('credentials', {
|
||||
state: () => ({ ...defaultState }),
|
||||
actions: {
|
||||
setCredentials(credentials) {
|
||||
this.credentials = credentials
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
current() {
|
||||
return window.vuex.state.users.currentUser.credentials
|
||||
},
|
||||
},
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue