From 8c8f8dbd9084b08a180bace2a545453ce9e9ecbb Mon Sep 17 00:00:00 2001 From: tdurieux Date: Thu, 16 Feb 2023 08:27:03 +0100 Subject: [PATCH] fix: fix user connection --- src/routes/route-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/route-utils.ts b/src/routes/route-utils.ts index c8ee049..795caa6 100644 --- a/src/routes/route-utils.ts +++ b/src/routes/route-utils.ts @@ -133,7 +133,7 @@ export async function getUser(req: express.Request) { if (!user) { notConnected(); } - const model = await UserModel.findById(user.id); + const model = await UserModel.findById(user._id); if (!model) { notConnected(); }