Skip to content

Commit 5e2eee6

Browse files
committed
fix create todo endpoint
1 parent 1ddc042 commit 5e2eee6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/api/routes/routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ router.get('/get_todos', async (req, res) => {
1818
router.post('/create_todo', async (req, res) => {
1919
const { todoContent } = req.body;
2020
try {
21-
await db.query(`INSERT INTO Todolist(todo) VALES ($1)`, [todoContent]);
21+
await db.query(`INSERT INTO Todolist(todo) VALUES ($1)`, [todoContent]);
2222
res.status(201).send();
2323
} catch (err) {
2424
res.status(500).send(`There was an error while creating ${todoContent}`);

0 commit comments

Comments
 (0)