Move some interactions to the backendInteractor
The idea is that all interactions should move there, so components don't have to pass around credentials all the time.
This commit is contained in:
parent
b1f9f6395c
commit
215e51f764
6 changed files with 50 additions and 9 deletions
14
src/modules/api.js
Normal file
14
src/modules/api.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js'
|
||||
|
||||
const api = {
|
||||
state: {
|
||||
backendInteractor: backendInteractorService()
|
||||
},
|
||||
mutations: {
|
||||
setBackendInteractor (state, backendInteractor) {
|
||||
state.backendInteractor = backendInteractor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default api
|
Loading…
Add table
Add a link
Reference in a new issue