From 17a0befae3c6991b8d06a2cc45a6b26041063af8 Mon Sep 17 00:00:00 2001 From: Nathaniel Tampus Date: Mon, 20 Mar 2023 18:22:26 +0800 Subject: [PATCH] use 204 status to avoid logging 404 to console --- server/src/controllers/auth.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/controllers/auth.controller.ts b/server/src/controllers/auth.controller.ts index 3f4e57f..5bf5b26 100644 --- a/server/src/controllers/auth.controller.ts +++ b/server/src/controllers/auth.controller.ts @@ -10,7 +10,7 @@ export const getCurrentSession = async (req: Request, res: Response) => { if (req.session.user) { res.status(200).json(req.session.user); } else { - res.status(404).end(); + res.status(204).end(); } } catch (err: unknown) { console.log(err);