diff --git a/src/auth/auth.route.ts b/src/auth/auth.route.ts index a96b133..c8639c1 100644 --- a/src/auth/auth.route.ts +++ b/src/auth/auth.route.ts @@ -93,7 +93,12 @@ export async function authRoutes(fastify: FastifyInstance) { userInDB.faliedLoginCount++; await userInDB.save(); - return res.code(401).send({ error: "invalid email or password" }); + return res + .code(401) + .send({ + error: "invalid email or password", + failedLoginCount: userInDB.faliedLoginCount, + }); } const newSession = await createSession(