Skip to content

Commit

Permalink
solve issues
Browse files Browse the repository at this point in the history
Relates #38 #25
  • Loading branch information
hashemt committed Aug 29, 2019
1 parent b349387 commit 79f0287
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/controllers/addPost.js
Original file line number Diff line number Diff line change
@@ -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));
};
2 changes: 1 addition & 1 deletion src/database/queries/getUserById.js
Original file line number Diff line number Diff line change
@@ -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],
Expand Down

0 comments on commit 79f0287

Please sign in to comment.