#51 optimize fetchTasksByProject

parent aaebc481
...@@ -157,7 +157,6 @@ export const fetchTasksByProject = (projects) => { ...@@ -157,7 +157,6 @@ export const fetchTasksByProject = (projects) => {
dispatch(fetchTasksByProjectRequest()); dispatch(fetchTasksByProjectRequest());
try { try {
await axios.post("/tasks/project", projects); await axios.post("/tasks/project", projects);
dispatch(addTaskSuccess())
dispatch(fetchTasksByProjectSuccess(response.data.tasks)) dispatch(fetchTasksByProjectSuccess(response.data.tasks))
} catch (error) { } catch (error) {
dispatch(fetchTasksByProjectFailure(error.response.data)); dispatch(fetchTasksByProjectFailure(error.response.data));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment