From 238dead666bcf30010807fdbe0d551de681c851a Mon Sep 17 00:00:00 2001 From: Maix0 <39835848+Maix0@users.noreply.github.com> Date: Sun, 31 Aug 2025 16:36:25 +0200 Subject: [PATCH] Update src/auth/src/routes/whoami.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/auth/src/routes/whoami.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/auth/src/routes/whoami.ts b/src/auth/src/routes/whoami.ts index 2c16b49..60b0c76 100644 --- a/src/auth/src/routes/whoami.ts +++ b/src/auth/src/routes/whoami.ts @@ -16,8 +16,7 @@ const route: FastifyPluginAsync = async (fastify, _opts): Promise => { "/api/auth/whoami", { schema: { response: { "2xx": WhoAmIRes } }, config: { requireAuth: true } }, async function(req, _res) { - if (isNullish(req.authUser)) - return makeResponse("success", "whoami.failure.generic") + return makeResponse("failure", "whoami.failure.generic") return makeResponse("success", "whoami.success", { name: req.authUser.name }) }, );