Skip to content

Commit

Permalink
Review 180 (#181)
Browse files Browse the repository at this point in the history
* convert case before find

* use id in reviewer table
  • Loading branch information
dongliu authored Aug 16, 2024
1 parent 6c8f4eb commit b9c5f7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/review.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const logger = require('./loggers').getLogger();
async function addReviewRequest(req, res, doc) {
const { uid, name } = req.body;
try {
const reviewer = await User.findById(uid).exec();
// id in user model is all lower case
const reviewer = await User.findById(uid.toLowerCase()).exec();
if (!reviewer) {
return res
.status(400)
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/review.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ $(function() {

const reviewAoColumns = [
selectColumn,
reviewerIdColumn,
userIdColumn,
requestedOnColumn,
reviewResultColumn,
];
Expand Down

0 comments on commit b9c5f7c

Please sign in to comment.