Skip to content

Commit

Permalink
refactored var name in searchUsers controller
Browse files Browse the repository at this point in the history
  • Loading branch information
NasihNazeem committed Nov 23, 2024
1 parent c752562 commit 669e4db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/UserController.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const updateUserInfo = async (req, res) => {

const searchUsers = async (req, res) => {
try {
const { keyword } = req.query;
const searchQuery = `%${keyword}%`;
const { keywords } = req.query;
const searchQuery = `%${keywords}%`;
const query = await pool.query(userQueries.searchUsers, [searchQuery]);
res.send(query.rows);
} catch (error) {
Expand Down

0 comments on commit 669e4db

Please sign in to comment.