From 7b4988a05918919a29812e48d63f0eb439f5df63 Mon Sep 17 00:00:00 2001 From: Dimitri DO BAIRRO Date: Thu, 2 Nov 2023 16:02:02 +0100 Subject: [PATCH] fix: lean model --- server/src/http/routes/admin/etablissement.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/http/routes/admin/etablissement.controller.ts b/server/src/http/routes/admin/etablissement.controller.ts index d217e32fd2..0c98a8b2c7 100644 --- a/server/src/http/routes/admin/etablissement.controller.ts +++ b/server/src/http/routes/admin/etablissement.controller.ts @@ -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()