Merge pull request #4513 from Infisical/update-dyn-secret-return

feat(dynamic-secret): made POST and PATCH endpoints return inputs
This commit is contained in:
x032205
2025-09-10 12:21:15 -04:00
committed by GitHub
2 changed files with 8 additions and 4 deletions
@@ -84,7 +84,9 @@ export const registerDynamicSecretRouter = async (server: FastifyZodProvider) =>
}), }),
response: { response: {
200: z.object({ 200: z.object({
dynamicSecret: SanitizedDynamicSecretSchema dynamicSecret: SanitizedDynamicSecretSchema.extend({
inputs: z.unknown()
})
}) })
} }
}, },
@@ -151,7 +153,9 @@ export const registerDynamicSecretRouter = async (server: FastifyZodProvider) =>
}), }),
response: { response: {
200: z.object({ 200: z.object({
dynamicSecret: SanitizedDynamicSecretSchema dynamicSecret: SanitizedDynamicSecretSchema.extend({
inputs: z.unknown()
})
}) })
} }
}, },
@@ -180,7 +180,7 @@ export const dynamicSecretServiceFactory = ({
return cfg; return cfg;
}); });
return dynamicSecretCfg; return { ...dynamicSecretCfg, inputs };
}; };
const updateByName: TDynamicSecretServiceFactory["updateByName"] = async ({ const updateByName: TDynamicSecretServiceFactory["updateByName"] = async ({
@@ -337,7 +337,7 @@ export const dynamicSecretServiceFactory = ({
return cfg; return cfg;
}); });
return updatedDynamicCfg; return { ...updatedDynamicCfg, inputs: updatedInput };
}; };
const deleteByName: TDynamicSecretServiceFactory["deleteByName"] = async ({ const deleteByName: TDynamicSecretServiceFactory["deleteByName"] = async ({