mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-31 13:41:09 -04:00 
			
		
		
		
	init crater
This commit is contained in:
		| @ -0,0 +1,23 @@ | ||||
| import * as types from './mutation-types' | ||||
|  | ||||
| export const loadData = ({ commit, dispatch, state }, id) => { | ||||
|   return new Promise((resolve, reject) => { | ||||
|     window.axios.get(`/api/settings/general`).then((response) => { | ||||
|       resolve(response) | ||||
|     }).catch((err) => { | ||||
|       reject(err) | ||||
|     }) | ||||
|   }) | ||||
| } | ||||
|  | ||||
| export const editPreferences = ({ commit, dispatch, state }, data) => { | ||||
|   return new Promise((resolve, reject) => { | ||||
|     window.axios.put('/api/settings/general', data).then((response) => { | ||||
|       // commit(types.UPDATE_USER, response.data) | ||||
|       commit(types.SET_MOMENT_DATE_FORMAT, data.moment_date_format) | ||||
|       resolve(response) | ||||
|     }).catch((err) => { | ||||
|       reject(err) | ||||
|     }) | ||||
|   }) | ||||
| } | ||||
		Reference in New Issue
	
	Block a user