MCPcopy Create free account
hub / github.com/codemistic/Web-Development / updatePost

Function updatePost

project_mern_memories/client/src/actions/posts.js:25–33  ·  view source on GitHub ↗
(id, post)

Source from the content-addressed store, hash-verified

23};
24
25export 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
35export const likePost = (id) => async (dispatch) => {
36 try {

Callers 1

handleSubmitFunction · 0.90

Calls 1

logMethod · 0.45

Tested by

no test coverage detected