feat(infisical-pg): resolved integration invalid cred error

This commit is contained in:
Akhil Mohan
2024-01-27 12:38:23 +05:30
parent 0d3f09d668
commit aed94ff5bb
7 changed files with 19 additions and 11 deletions
@@ -5,6 +5,7 @@ import { IntegrationAuthsSchema, SecretApprovalPoliciesSchema } from "@app/db/sc
// sometimes the return data must be santizied to avoid leaking important values
// always prefer pick over omit in zod
export const integrationAuthPubSchema = IntegrationAuthsSchema.pick({
id: true,
projectId: true,
integration: true,
teamId: true,
@@ -291,7 +291,15 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
}),
response: {
200: z.object({
integrations: IntegrationsSchema.array()
integrations: IntegrationsSchema.merge(
z.object({
environment: z.object({
id: z.string(),
name: z.string(),
slug: z.string()
})
})
).array()
})
}
},