Skip to content

Commit

Permalink
fix: lean model
Browse files Browse the repository at this point in the history
  • Loading branch information
rimiti committed Nov 2, 2023
1 parent f7fc030 commit 7b4988a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/http/routes/admin/etablissement.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default (server: Server) => {
onRequest: [server.auth(zRoutes.get["/admin/etablissements/:id"])],
},
async (req, res) => {
const etablissement = await Etablissement.findById(req.params.id)
const etablissement = await Etablissement.findById(req.params.id).lean()

if (!etablissement) {
throw Boom.notFound()
Expand Down

0 comments on commit 7b4988a

Please sign in to comment.