Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
fix: add username to loans query option
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwigoric committed Nov 21, 2023
1 parent 99e5903 commit 0a0e2af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/loans.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ router.get('/:username', async (req, res, next) => {
return res.status(404).json({ message: 'Loanee does not exist' })
}

const options = { deleted: false }
const options = { username, deleted: false }
if (['approved', 'pending', 'rejected'].includes(req.query.status))
options.status = req.query.status

Expand Down

0 comments on commit 0a0e2af

Please sign in to comment.