MCPcopy
hub / github.com/Hashnode/mern-starter / fetchPost

Function fetchPost

client/modules/Post/PostActions.js:43–47  ·  view source on GitHub ↗
(cuid)

Source from the content-addressed store, hash-verified

41}
42
43export function fetchPost(cuid) {
44 return (dispatch) => {
45 return callApi(`posts/${cuid}`).then(res => dispatch(addPost(res.post)));
46 };
47}
48
49export function deletePost(cuid) {
50 return {

Callers 1

PostDetailPage.jsFile · 0.90

Calls 2

callApiFunction · 0.85
addPostFunction · 0.70

Tested by

no test coverage detected