Skip to content

Commit

Permalink
more fixes to server
Browse files Browse the repository at this point in the history
  • Loading branch information
amritvela committed Jan 31, 2023
1 parent 8a68353 commit bffefe1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/controllers/userController.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ userController.verifyUser = async (req, res, next) => {

userController.getUser = async (req, res, next) => {
console.log(`req.params in GET USER======`, req.params);
const { item_id } = req.params;
const insertArray = [item_id];
const { user_id } = req.params;
const insertArray = [user_id];

try {
const sqlQuery = `SELECT * FROM users where item_id = $1`;
const sqlQuery = `SELECT * FROM users where user_id = $1`;
const result = await db.query(sqlQuery, insertArray);
console.log(`result======`, result);
res.locals.userInfo = result.rows[0];
Expand Down

0 comments on commit bffefe1

Please sign in to comment.