mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
WIP Feature / General & Users & Sidebar
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import ApiService from 'services/ApiService';
|
||||
import t from 'store/types';
|
||||
|
||||
export const submitOptions = ({ form }) => {
|
||||
return (dispatch) => {
|
||||
return ApiService.post('options', form);
|
||||
};
|
||||
};
|
||||
|
||||
export const FetchOptions = ({ form }) => {
|
||||
return (dispatch) =>
|
||||
new Promise((resolve, reject) => {
|
||||
ApiService.get('options')
|
||||
.then((response) => {
|
||||
dispatch({
|
||||
type: t.SETTING_SET,
|
||||
options: response.data.options,
|
||||
});
|
||||
resolve(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user