diff --git a/src/controllers/addPost.js b/src/controllers/addPost.js index f6e67aa..a853763 100644 --- a/src/controllers/addPost.js +++ b/src/controllers/addPost.js @@ -1,7 +1,7 @@ const { addPost } = require('../database/queries/addPost'); exports.addPost = (req, res, next) => { - addPost(req.body, req.cookie.id) + addPost(req.body, req.cookies.id) .then(() => res.redirect('/')) .catch((err) => next(err.stack)); }; diff --git a/src/database/queries/getUserById.js b/src/database/queries/getUserById.js index a65fc53..11bbc24 100644 --- a/src/database/queries/getUserById.js +++ b/src/database/queries/getUserById.js @@ -1,7 +1,7 @@ const dbconnection = require('../config/connection'); exports.getUserById = (data) => { - const id = data; + const id = data; return dbconnection.query({ text: 'SELECT * FROM users WHERE id = $1', values: [id],