diff --git a/03-task-manager/starter/public/edit-task.js b/03-task-manager/starter/public/edit-task.js index 3bd0eed24..b7a85f76d 100644 --- a/03-task-manager/starter/public/edit-task.js +++ b/03-task-manager/starter/public/edit-task.js @@ -11,9 +11,9 @@ let tempName const showTask = async () => { try { const { - data: { task }, + data } = await axios.get(`/api/v1/tasks/${id}`) - const { _id: taskID, completed, name } = task + const { _id: taskID, completed, name } = data taskIDDOM.textContent = taskID taskNameDOM.value = name