Skip to content

Commit

Permalink
Added projection fields for voie and lieu-dit lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineludeau committed Jun 19, 2024
1 parent 5657c0a commit 208837e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/models/commune.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ async function getPopulatedCommune(codeCommune) {
}

async function getPopulatedVoie(idVoie) {
const voieFields = ['type', 'idVoie', 'banId', 'nomVoie', 'nomVoieAlt', 'sourceNomVoie', 'sources', 'codeCommune', 'nbNumeros', 'nbNumerosCertifies', 'displayBBox', 'dateMAJ']
const voieFields = ['type', 'idVoie', 'banId', 'nomVoie', 'nomVoieAlt', 'sourceNomVoie', 'sources', 'source', 'codeCommune', 'nbNumeros', 'nbNumerosCertifies', 'displayBBox', 'dateMAJ', 'position']

const voie = await mongo.db.collection('voies')
.findOne({idVoie}, {projection: fieldsToProj(voieFields)})
Expand Down

0 comments on commit 208837e

Please sign in to comment.