#116 edit task mytask set up

parent 0ee7fdf1
...@@ -152,7 +152,7 @@ export const editTask = (task) => { ...@@ -152,7 +152,7 @@ export const editTask = (task) => {
return async (dispatch) => { return async (dispatch) => {
dispatch(editTaskRequest()); dispatch(editTaskRequest());
try { try {
await axios.put("/tasks", task); await axios.put(`/tasks/${task.id}`, task);
dispatch(editTaskSuccess()) dispatch(editTaskSuccess())
dispatch(fetchAllTasks()) dispatch(fetchAllTasks())
} catch (error) { } catch (error) {
......
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