Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

define the same pattern that exists on other rotations

adilson799b4b3fe259
diff --git a/backend/src/ee/services/secret-rotation-v2/cloudflare-api-token/cloudflare-api-token-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/cloudflare-api-token/cloudflare-api-token-rotation-fns.ts
index 3200e41b7c..0251f8551f 100644
--- a/backend/src/ee/services/secret-rotation-v2/cloudflare-api-token/cloudflare-api-token-rotation-fns.ts
+++ b/backend/src/ee/services/secret-rotation-v2/cloudflare-api-token/cloudflare-api-token-rotation-fns.ts
@@ -104,6 +104,7 @@ export const cloudflareApiTokenRotationFactory: TRotationFactory<
callback
) => {
const newCredentials = await $createToken();
+ const result = await callback(newCredentials);
if (credentialsToRevoke?.tokenId) {
try {
@@ -118,7 +119,7 @@ export const cloudflareApiTokenRotationFactory: TRotationFactory<
}
}
- return callback(newCredentials);
+ return result;
};
const getSecretsPayload: TRotationFactoryGetSecretsPayload<TCloudflareApiTokenRotationGeneratedCredentials> = (