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

Function fetchPosts

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

Source from the content-addressed store, hash-verified

3const url = 'http://localhost:5000/posts';
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);

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected