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

Function likePost

project_mern_memories/client/src/actions/posts.js:35–43  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

33};
34
35export const likePost = (id) => async (dispatch) => {
36 try {
37 const { data } = await api.likePost(id);
38
39 dispatch({ type: LIKE, payload: data });
40 } catch (error) {
41 console.log(error.message);
42 }
43};
44
45export const deletePost = (id) => async (dispatch) => {
46 try {

Callers 1

Post.jsFile · 0.90

Calls 1

logMethod · 0.45

Tested by

no test coverage detected