fix(refactor): add services/adapters/useCases

This commit is contained in:
2024-03-06 12:46:19 +03:00
parent e8609ee6d4
commit 4b6cda8632
25 changed files with 769 additions and 50 deletions

View File

@@ -1,14 +1,7 @@
import Users from '@helpers/Users/Users.js';
const path = import.meta.env.VITE_API_ADDR
const UsersService = new Users(path, {
id: 'id',
first_name: 'first_name',
last_name: 'last_name',
email: 'email',
role: 'role',
is_active: 'is_active'
})
const UsersService = new Users(path)
const initState = {
usersList: [],
@@ -36,7 +29,7 @@ const actions = {
commit('setComponentState', 'active')
},
resetStore: ({state}) => {
Object.entries(initState).forEach(([k,v]) => {
Object.entries(initState).forEach(([k, v]) => {
state[k] = v
})
},