From 9a6da85e73c7e9ec72fce826c0f3969c55b9a64b Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 3 Oct 2024 04:04:03 +0530 Subject: [PATCH] feat: set raw true --- server/src/routes/auth.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/routes/auth.ts b/server/src/routes/auth.ts index d1d6a85d..9be81e69 100644 --- a/server/src/routes/auth.ts +++ b/server/src/routes/auth.ts @@ -97,6 +97,7 @@ router.post('/generate-api-key', requireSignIn, async (req: AuthenticatedRequest return res.status(401).json({ ok: false, error: 'Unauthorized' }); } const user = await User.findByPk(req.user.id, { + raw: true, attributes: { exclude: ['password'] }, });