mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
Fix bugs.
This commit is contained in:
@@ -65,5 +65,14 @@ export const fetchItem = ({ id }) => {
|
||||
};
|
||||
|
||||
export const deleteItem = ({ id }) => {
|
||||
return dispatch => ApiService.delete(`items/${id}`);
|
||||
return dispatch => new Promise((resolve, reject) => {
|
||||
ApiService.delete(`items/${id}`)
|
||||
.then((response) => {
|
||||
dispatch({
|
||||
type: t.ITEM_DELETE,
|
||||
payload: { id },
|
||||
});
|
||||
resolve(response);
|
||||
}).catch((error) => { reject(error); });
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user