feat: modified backend token endpoint to return organizationid

This commit is contained in:
=
2025-01-06 14:55:08 +05:30
parent a2c9494d52
commit 64fd15c32d
+3 -2
View File
@@ -63,7 +63,8 @@ export const registerAuthRoutes = async (server: FastifyZodProvider) => {
schema: { schema: {
response: { response: {
200: z.object({ 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 } { expiresIn: appCfg.JWT_AUTH_LIFETIME }
); );
return { token }; return { token, organizationId: decodedToken.organizationId };
} }
}); });
}; };