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 }) }, );