Skip to content

Commit

Permalink
Doing proper insert checjs
Browse files Browse the repository at this point in the history
  • Loading branch information
rsriniva committed Jun 16, 2018
1 parent 0a97a5e commit 5d046f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/routes/notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ router.get(`${BASE_URL}/:id`, async (ctx) => {
router.post(`${BASE_URL}`, async (ctx) => {
try {
const noteId = await queries.addNote(ctx.request.body);
if (noteId.length) {
if (!isNaN(noteId)) {
ctx.status = 201;
ctx.body = {
status: 'success',
Expand Down

0 comments on commit 5d046f9

Please sign in to comment.