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

Commit

Permalink
feat: deselect ledger from info in getting specific loan
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwigoric committed Nov 28, 2023
1 parent ae20e99 commit 4173ad9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/loans.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ router.get('/:loanID', async (req, res, next) => {

try {
const loan = await Loan.findOne({ deleted: false, loanID: req.params.loanID })
.select('-classification -__v -_id')
.select('-classification -ledger -__v -_id')
.lean()

// Return loans
Expand Down Expand Up @@ -126,7 +126,7 @@ router.get('/user/:username', async (req, res, next) => {
optionsList.push({ ...options, status: s })
})

const loans = await Loan.find({ $or: optionsList }).select('-__v -_id').lean()
const loans = await Loan.find({ $or: optionsList }).select('-__v -_id -ledger').lean()

parseDecimal(loans)
// Return loans
Expand Down

0 comments on commit 4173ad9

Please sign in to comment.