mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 18:27:19 +00:00
Merge pull request #2548 from Infisical/daniel/include-env-on-interation
fix: include env on integration api
This commit is contained in:
@@ -52,7 +52,13 @@ export const registerIntegrationRouter = async (server: FastifyZodProvider) => {
|
|||||||
}),
|
}),
|
||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
integration: IntegrationsSchema
|
integration: IntegrationsSchema.extend({
|
||||||
|
environment: z.object({
|
||||||
|
slug: z.string().trim(),
|
||||||
|
name: z.string().trim(),
|
||||||
|
id: z.string().trim()
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -138,7 +144,13 @@ export const registerIntegrationRouter = async (server: FastifyZodProvider) => {
|
|||||||
}),
|
}),
|
||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
integration: IntegrationsSchema
|
integration: IntegrationsSchema.extend({
|
||||||
|
environment: z.object({
|
||||||
|
slug: z.string().trim(),
|
||||||
|
name: z.string().trim(),
|
||||||
|
id: z.string().trim()
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -120,7 +120,13 @@ export const integrationServiceFactory = ({
|
|||||||
secretPath,
|
secretPath,
|
||||||
projectId: integrationAuth.projectId
|
projectId: integrationAuth.projectId
|
||||||
});
|
});
|
||||||
return { integration, integrationAuth };
|
return {
|
||||||
|
integration: {
|
||||||
|
...integration,
|
||||||
|
environment: folder.environment
|
||||||
|
},
|
||||||
|
integrationAuth
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateIntegration = async ({
|
const updateIntegration = async ({
|
||||||
@@ -183,7 +189,10 @@ export const integrationServiceFactory = ({
|
|||||||
projectId: folder.projectId
|
projectId: folder.projectId
|
||||||
});
|
});
|
||||||
|
|
||||||
return updatedIntegration;
|
return {
|
||||||
|
...updatedIntegration,
|
||||||
|
environment: folder.environment
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const getIntegration = async ({ id, actor, actorAuthMethod, actorId, actorOrgId }: TGetIntegrationDTO) => {
|
const getIntegration = async ({ id, actor, actorAuthMethod, actorId, actorOrgId }: TGetIntegrationDTO) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user