From 601b05b87a4d347c1744159bf7a49c6e733eaf61 Mon Sep 17 00:00:00 2001 From: Kris Fox Date: Tue, 3 Oct 2023 20:08:16 -0700 Subject: [PATCH] added my slash --- src/app/todos/page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/todos/page.js b/src/app/todos/page.js index 1c5a6a12..f34c5b3d 100644 --- a/src/app/todos/page.js +++ b/src/app/todos/page.js @@ -25,7 +25,7 @@ export default function ToDos() { function addNewTodo() { if(newTodo && newTodo.length) { - fetch("api/todos", { method: "post", body: JSON.stringify({value: newTodo, done: false}) } ).then((response) => { + fetch("/api/todos", { method: "post", body: JSON.stringify({value: newTodo, done: false}) } ).then((response) => { return response.json().then((newTodo) => { setTodos([...todos, newTodo]); setNewTodo('');