Skip to content

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

remove unused parameter

Matheus Nogueira19e184fe671f
diff --git a/backend/src/server/routes/v1/secret-sync-routers/secret-sync-endpoints.ts b/backend/src/server/routes/v1/secret-sync-routers/secret-sync-endpoints.ts
index ab34f23e19..98657f05f3 100644
--- a/backend/src/server/routes/v1/secret-sync-routers/secret-sync-endpoints.ts
+++ b/backend/src/server/routes/v1/secret-sync-routers/secret-sync-endpoints.ts
@@ -506,14 +506,13 @@ export const registerSyncSecretsEndpoints = <T extends TSecretSync, I extends TS
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
handler: async (req) => {
- const { destinationConfig, connectionId, syncOptions, excludeSyncId, projectId } = req.body;
+ const { destinationConfig, connectionId, excludeSyncId, projectId } = req.body;
const result = await server.services.secretSync.checkDuplicateDestination(
{
destinationConfig: destinationConfig as Record<string, unknown>,
destination,
connectionId,
- syncOptions,
excludeSyncId,
projectId
},
diff --git a/backend/src/services/secret-sync/secret-sync-service.ts b/backend/src/services/secret-sync/secret-sync-service.ts
index 72f90735a1..dedcdec84a 100644
--- a/backend/src/services/secret-sync/secret-sync-service.ts
+++ b/backend/src/services/secret-sync/secret-sync-service.ts
@@ -258,14 +258,7 @@ export const secretSyncServiceFactory = ({
};
const checkDuplicateDestination = async (
- {
- destination,
- destinationConfig,
- connectionId,
- syncOptions,
- excludeSyncId,
- projectId
- }: TCheckDuplicateDestinationDTO,
+ { destination, destinationConfig, connectionId, excludeSyncId, projectId }: TCheckDuplicateDestinationDTO,
actor: OrgServiceActor
) => {
const skipFields = SECRET_SYNC_SKIP_FIELDS_MAP[destination];
@@ -433,7 +426,6 @@ export const secretSyncServiceFactory = ({
destination: params.destination,
destinationConfig: params.destinationConfig,
connectionId: params.connectionId,
- syncOptions: params.syncOptions as Record<string, unknown> | undefined,
projectId
},
actor
@@ -558,7 +550,7 @@ export const secretSyncServiceFactory = ({
let { folderId } = secretSync;
- if (params.destinationConfig || params.connectionId || params.syncOptions) {
+ if (params.destinationConfig || params.connectionId) {
// getProjectPermission above throws NotFoundError if the project doesn't exist and
// guarantees actor.orgId === project.orgId — no separate project lookup needed.
const organization = await requestMemoize(requestMemoKeys.orgFindById(actor.orgId), () =>
@@ -571,9 +563,6 @@ export const secretSyncServiceFactory = ({
destination,
destinationConfig: params.destinationConfig ?? (secretSync.destinationConfig as Record<string, unknown>),
connectionId: params.connectionId ?? connectionId,
- syncOptions:
- (params.syncOptions as Record<string, unknown> | undefined) ??
- (secretSync.syncOptions as Record<string, unknown> | null),
projectId: secretSync.projectId,
excludeSyncId: secretSync.id
},
diff --git a/backend/src/services/secret-sync/secret-sync-types.ts b/backend/src/services/secret-sync/secret-sync-types.ts
index e2397a0e73..10b898d0e7 100644
--- a/backend/src/services/secret-sync/secret-sync-types.ts
+++ b/backend/src/services/secret-sync/secret-sync-types.ts
@@ -475,7 +475,6 @@ export type TCheckDuplicateDestinationDTO = {
destination: SecretSync;
destinationConfig: Record<string, unknown>;
connectionId?: string | null;
- syncOptions?: Record<string, unknown> | null;
excludeSyncId?: string;
projectId: string;
};
diff --git a/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx b/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx
index f9dbfb0c89..16f9467ebe 100644
--- a/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx
+++ b/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx
@@ -215,7 +215,6 @@ export const CreateSecretSyncForm = ({
destination,
projectId: currentProject?.id || "",
connectionId: watch("connection")?.id,
- syncOptions: watch("syncOptions"),
enabled: true,
destinationConfig: watch("destinationConfig")
});
diff --git a/frontend/src/components/secret-syncs/forms/EditSecretSyncForm.tsx b/frontend/src/components/secret-syncs/forms/EditSecretSyncForm.tsx
index f37219e643..c7867c4ecf 100644
--- a/frontend/src/components/secret-syncs/forms/EditSecretSyncForm.tsx
+++ b/frontend/src/components/secret-syncs/forms/EditSecretSyncForm.tsx
@@ -156,7 +156,6 @@ export const EditSecretSyncForm = ({ secretSync, onComplete, onDirtyChange, onCa
secretSync.projectId,
secretSync.id,
formMethods.watch("connection")?.id,
- formMethods.watch("syncOptions"),
{ enabled: checkDuplicateEnabled && Boolean(destinationConfigToCheck) }
);
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx
index 23e38f399f..beb7998f2f 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx
@@ -103,7 +103,6 @@ export const SecretSyncReviewFields = () => {
destination,
projectId: currentProject?.id || "",
connectionId: connection?.id,
- syncOptions: watch("syncOptions"),
enabled: true,
destinationConfig: watch("destinationConfig")
});
diff --git a/frontend/src/hooks/api/secretSyncs/queries.tsx b/frontend/src/hooks/api/secretSyncs/queries.tsx
index f02265e741..2019902a69 100644
--- a/frontend/src/hooks/api/secretSyncs/queries.tsx
+++ b/frontend/src/hooks/api/secretSyncs/queries.tsx
@@ -19,7 +19,6 @@ export const secretSyncKeys = {
destination: SecretSync,
destinationConfig: unknown,
connectionId?: string,
- syncOptions?: unknown,
excludeSyncId?: string
) =>
[
@@ -28,7 +27,6 @@ export const secretSyncKeys = {
"duplicate-check",
destinationConfig,
connectionId,
- syncOptions,
excludeSyncId
] as const
};
@@ -111,7 +109,6 @@ export const useCheckDuplicateDestination = (
projectId: string,
excludeSyncId?: string,
connectionId?: string,
- syncOptions?: unknown,
options?: Omit<
UseQueryOptions<
{ hasDuplicate: boolean; duplicateProjectId?: string },
@@ -127,7 +124,6 @@ export const useCheckDuplicateDestination = (
destination,
destinationConfig,
connectionId,
- syncOptions,
excludeSyncId
),
queryFn: async () => {
@@ -137,7 +133,6 @@ export const useCheckDuplicateDestination = (
}>(`/api/v1/secret-syncs/${destination}/check-destination`, {
destinationConfig,
connectionId,
- syncOptions,
excludeSyncId,
projectId
});
diff --git a/frontend/src/hooks/api/secretSyncs/useDuplicateDestinationCheck.ts b/frontend/src/hooks/api/secretSyncs/useDuplicateDestinationCheck.ts
index 7d3c782c1f..3615fa1a1d 100644
--- a/frontend/src/hooks/api/secretSyncs/useDuplicateDestinationCheck.ts
+++ b/frontend/src/hooks/api/secretSyncs/useDuplicateDestinationCheck.ts
@@ -7,7 +7,6 @@ type UseDuplicateDestinationCheckProps = {
projectId: string;
excludeSyncId?: string;
connectionId?: string;
- syncOptions?: unknown;
enabled?: boolean;
destinationConfig?: unknown;
};
@@ -17,7 +16,6 @@ export const useDuplicateDestinationCheck = ({
projectId,
excludeSyncId,
connectionId,
- syncOptions,
enabled = true,
destinationConfig
}: UseDuplicateDestinationCheckProps) => {
@@ -44,7 +42,6 @@ export const useDuplicateDestinationCheck = ({
projectId,
excludeSyncId,
connectionId,
- syncOptions,
{
enabled: shouldCheck,
staleTime: 0,