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

Function createPost

project_mern_memories/client/src/api/index.js:6–6  ·  view source on GitHub ↗
(newPost)

Source from the content-addressed store, hash-verified

4
5export const fetchPosts = () => axios.get(url);
6export const createPost = (newPost) => axios.post(url, newPost);
7export const likePost = (id) => axios.patch(`${url}/${id}/likePost`);
8export const updatePost = (id, updatedPost) => axios.patch(`${url}/${id}`, updatedPost);
9export const deletePost = (id) => axios.delete(`${url}/${id}`);

Callers

nothing calls this directly

Calls 1

postMethod · 0.45

Tested by

no test coverage detected