Skip to content

Commit

Permalink
Merge pull request #378 from BaseAdresseNationale/antoineludeau/fix-g…
Browse files Browse the repository at this point in the history
…et-district-by-cog-api-response

Fix get district by cog api response adding lastRecordDate property
  • Loading branch information
antoineludeau authored Apr 8, 2024
2 parents f079c74 + 0d77ec1 commit ff2dc9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/api/district/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ app.get('/cog/:cog', analyticsMiddleware, async (req, res) => {
return
}

const districtBodies = districts.map(({_id, ...districtBody}) => districtBody)
const districtBodies = districts.map(district => formatDistrict(district))

response = {
date: new Date(),
status: 'success',
Expand Down

0 comments on commit ff2dc9c

Please sign in to comment.