From 4f690a21512206be9e8106ba5904e4e782a04582 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 3 Jun 2025 03:55:45 -0300 Subject: [PATCH] swap status and send order for invalid note --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 6b24070..ac0d1b9 100644 --- a/index.js +++ b/index.js @@ -132,7 +132,7 @@ router.get('/data.json', (req, res) => { router.post('/new_note_spa', (req, res) => { if (!isValidNote(req.body)) { - return res.send('invalid note').status(400) + return res.status(400).send('invalid note') } createNote(formatNote(req.body))