(post)
| 14 | } |
| 15 | |
| 16 | export 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 | |
| 28 | export function addPosts(posts) { |
| 29 | return { |
no test coverage detected