(id, post)
| 23 | }; |
| 24 | |
| 25 | export const updatePost = (id, post) => async (dispatch) => { |
| 26 | try { |
| 27 | const { data } = await api.updatePost(id, post); |
| 28 | |
| 29 | dispatch({ type: UPDATE, payload: data }); |
| 30 | } catch (error) { |
| 31 | console.log(error.message); |
| 32 | } |
| 33 | }; |
| 34 | |
| 35 | export const likePost = (id) => async (dispatch) => { |
| 36 | try { |