Skip to content

Commit

Permalink
Fix code scanning alert no. 1: Database query built from user-control…
Browse files Browse the repository at this point in the history
…led sources

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 53ffb75 commit d3d50c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/post.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ if(post){
}


const boardCreated = await Board.findOne({ boardTitle: req.body.boardTitle });
const boardCreated = await Board.findOne({ boardTitle: { $eq: req.body.boardTitle } });
if(boardCreated){
boardCreated.posts.push(post._id);
await boardCreated.save();
Expand Down

0 comments on commit d3d50c0

Please sign in to comment.