diff --git a/src/actions/index.js b/src/actions/index.js index c4a7f5f..a3f017b 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -39,10 +39,7 @@ export const loadCookieToState = (data) => async (dispatch) => { export const newBlogPost = (payload) => async (dispatch) => { const response = await sudoscientist.post('/blog', payload) - if (response.status === 401) { - dispatch({ type: 'BLOG_POST_FAILED', payload: null }) - } - if (response.status === 200) { - dispatch({ type: 'BLOG_POST_CREATED', payload: response }) + if (response.status === 201) { + console.log('CREATED') } };