Skip to content

swap ".status" and ".send" order for invalid note in in new_note_spa route#10

Open
maizena-y-javascript wants to merge 1 commit into
mluukkai:masterfrom
maizena-y-javascript:fix-status-order
Open

swap ".status" and ".send" order for invalid note in in new_note_spa route#10
maizena-y-javascript wants to merge 1 commit into
mluukkai:masterfrom
maizena-y-javascript:fix-status-order

Conversation

@maizena-y-javascript
Copy link
Copy Markdown

In the route /new_note_spa, the response for invalid notes called res.send() before res.status(400),
which results in HTTP 200 instead of 400.
This PR swaps the order to res.status(400).send(...) to return the proper status code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant