Update src/auth/src/routes/whoami.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
a6ce4630f5
commit
238dead666
1 changed files with 1 additions and 2 deletions
|
|
@ -16,8 +16,7 @@ const route: FastifyPluginAsync = async (fastify, _opts): Promise<void> => {
|
|||
"/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 })
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue