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

Function addPostRequest

client/modules/Post/PostActions.js:16–26  ·  view source on GitHub ↗
(post)

Source from the content-addressed store, hash-verified

14}
15
16export function addPostRequest(post) {
17 return (dispatch) => {
18 return callApi('posts', 'post', {
19 post: {
20 name: post.name,
21 title: post.title,
22 content: post.content,
23 },
24 }).then(res => dispatch(addPost(res.post)));
25 };
26}
27
28export function addPosts(posts) {
29 return {

Callers 1

PostListPage.jsFile · 0.90

Calls 2

callApiFunction · 0.85
addPostFunction · 0.70

Tested by

no test coverage detected