Skip to content

Commit

Permalink
fix(index.js): true/false on put
Browse files Browse the repository at this point in the history
  • Loading branch information
jhderojasUVa committed Aug 16, 2022
1 parent d67811b commit f01e0d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ connection.on('connect', (err) => {
// date is always when you do the thing
const date = Date.now();

const request = new Request(`UPDATE Todo SET description = '${description}', completed = ${completed}, date = ${date} WHERE id = '${req.params.id}'`, (err) => {
const request = new Request(`UPDATE Todo SET description = '${description}', completed = ${trueOrfalse[completed]}, date = ${date} WHERE id = '${req.params.id}'`, (err) => {
if (err) {
res.json(responses.errorResponse(err));
return;
Expand Down

0 comments on commit f01e0d8

Please sign in to comment.