mirror of
https://github.com/crater-invoice/crater.git
synced 2025-11-02 13:33:17 -05:00
init crater
This commit is contained in:
@ -0,0 +1,26 @@
|
||||
// import * as types from './mutation-types'
|
||||
|
||||
export const loadData = ({ commit, dispatch, state }, id) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
window.axios.get(`/api/settings/company`).then((response) => {
|
||||
resolve(response)
|
||||
}).catch((err) => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export const editCompany = ({ commit, dispatch, state }, data) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
window.axios.post('/api/settings/company', data, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}).then((response) => {
|
||||
// commit(types.UPDATE_ITEM, response.data)
|
||||
resolve(response)
|
||||
}).catch((err) => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user