From 64fd15c32d8c9fab7b8c484d782557aafbcc06ad Mon Sep 17 00:00:00 2001 From: = Date: Sun, 15 Dec 2024 21:20:13 +0530 Subject: [PATCH] feat: modified backend token endpoint to return organizationid --- backend/src/server/routes/v1/auth-router.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/server/routes/v1/auth-router.ts b/backend/src/server/routes/v1/auth-router.ts index 6e39d0451..46f856105 100644 --- a/backend/src/server/routes/v1/auth-router.ts +++ b/backend/src/server/routes/v1/auth-router.ts @@ -63,7 +63,8 @@ export const registerAuthRoutes = async (server: FastifyZodProvider) => { schema: { response: { 200: z.object({ - token: z.string() + token: z.string(), + organizationId: z.string().optional() }) } }, @@ -115,7 +116,7 @@ export const registerAuthRoutes = async (server: FastifyZodProvider) => { { expiresIn: appCfg.JWT_AUTH_LIFETIME } ); - return { token }; + return { token, organizationId: decodedToken.organizationId }; } }); };