You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
645 B
19 lines
645 B
import proxy from '../proxy'; |
|
const blog = { |
|
list: (data = {}) => async (dispatch) => |
|
await proxy.get('blog/list', data, { dispatch }), |
|
update: (data = {}, data2 = {}) => async (dispatch) => { |
|
await proxy.put('blog/update', data); |
|
await proxy.get('blog/list', data2, { dispatch }); |
|
}, |
|
add: (data = {}, data2 = {}) => async (dispatch) => { |
|
await proxy.post('blog/add', data); |
|
await proxy.get('blog/list', data2, { dispatch }); |
|
}, |
|
del: (data = {}, data2 = {}) => async (dispatch) => { |
|
await proxy.delete('blog/delete', data); |
|
await proxy.get('blog/list', data2, { dispatch }); |
|
}, |
|
}; |
|
|
|
export default blog; |