Skip to content

Commit

Permalink
feat: modified backend token endpoint to return organizationid
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilmhdh committed Dec 29, 2024
1 parent 3b7cb16 commit 43cabc0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/src/server/routes/v1/auth-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
}
},
Expand Down Expand Up @@ -115,7 +116,7 @@ export const registerAuthRoutes = async (server: FastifyZodProvider) => {
{ expiresIn: appCfg.JWT_AUTH_LIFETIME }
);

return { token };
return { token, organizationId: decodedToken.organizationId };
}
});
};

0 comments on commit 43cabc0

Please sign in to comment.