mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 13:28:27 +00:00
Endpoint improvements
This commit is contained in:
@@ -488,17 +488,20 @@ export const registerIdentityRouter = async (server: FastifyZodProvider) => {
|
|||||||
schema: {
|
schema: {
|
||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
id: z.string(),
|
identityDetails: z.object({
|
||||||
name: z.string(),
|
organization: z.object({
|
||||||
slug: z.string(),
|
id: z.string(),
|
||||||
role: z.string()
|
name: z.string(),
|
||||||
|
slug: z.string()
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onRequest: verifyAuth([AuthMode.IDENTITY_ACCESS_TOKEN], { requireOrg: false }),
|
onRequest: verifyAuth([AuthMode.IDENTITY_ACCESS_TOKEN], { requireOrg: false }),
|
||||||
handler: async (req) => {
|
handler: async (req) => {
|
||||||
const organization = await server.services.org.findIdentityOrganization(req.permission.id);
|
const organization = await server.services.org.findIdentityOrganization(req.permission.id);
|
||||||
return organization;
|
return { identityDetails: { organization } };
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user