Skip to content

Commit

Permalink
updated request body filter passport#4
Browse files Browse the repository at this point in the history
  • Loading branch information
devlopersabbir committed Oct 25, 2023
1 parent fe68761 commit b5a7662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ router.post('/', function(req, res, next) {
db.run('INSERT INTO todos (owner_id, title, completed) VALUES (?, ?, ?)', [
req.user.id,
req.body.title,
req.body.completed == true ? 1 : null
req.body.filter == "completed" ? 1 : null
], function(err) {
if (err) { return next(err); }
return res.redirect('/' + (req.body.filter || ''));
Expand Down

0 comments on commit b5a7662

Please sign in to comment.