mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 15:40:47 +00:00
misc: renamed enum
This commit is contained in:
+3
-1
@@ -10,7 +10,9 @@ import { SecretSync } from "@app/hooks/api/secretSyncs";
|
||||
import { TSecretSyncForm } from "../schemas";
|
||||
|
||||
export const GcpSyncFields = () => {
|
||||
const { control, setValue } = useFormContext<TSecretSyncForm & { destination: SecretSync.GCP }>();
|
||||
const { control, setValue } = useFormContext<
|
||||
TSecretSyncForm & { destination: SecretSync.GCPSecretManager }
|
||||
>();
|
||||
|
||||
const connectionId = useWatch({ name: "connection.id", control });
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ export const SecretSyncDestinationFields = () => {
|
||||
return <AwsParameterStoreSyncFields />;
|
||||
case SecretSync.GitHub:
|
||||
return <GitHubSyncFields />;
|
||||
case SecretSync.GCP:
|
||||
case SecretSync.GCPSecretManager:
|
||||
return <GcpSyncFields />;
|
||||
default:
|
||||
throw new Error(`Unhandled Destination Config Field: ${destination}`);
|
||||
|
||||
+3
-1
@@ -5,7 +5,9 @@ import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";
|
||||
import { SecretSync } from "@app/hooks/api/secretSyncs";
|
||||
|
||||
export const GcpSyncReviewFields = () => {
|
||||
const { watch } = useFormContext<TSecretSyncForm & { destination: SecretSync.GCP }>();
|
||||
const { watch } = useFormContext<
|
||||
TSecretSyncForm & { destination: SecretSync.GCPSecretManager }
|
||||
>();
|
||||
const projectId = watch("destinationConfig.projectId");
|
||||
|
||||
return <SecretSyncLabel label="Project ID">{projectId}</SecretSyncLabel>;
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ export const SecretSyncReviewFields = () => {
|
||||
case SecretSync.GitHub:
|
||||
DestinationFieldsComponent = <GitHubSyncReviewFields />;
|
||||
break;
|
||||
case SecretSync.GCP:
|
||||
case SecretSync.GCPSecretManager:
|
||||
DestinationFieldsComponent = <GcpSyncReviewFields />;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -3,7 +3,7 @@ import { z } from "zod";
|
||||
import { SecretSync } from "@app/hooks/api/secretSyncs";
|
||||
|
||||
export const GcpSyncDestinationSchema = z.object({
|
||||
destination: z.literal(SecretSync.GCP),
|
||||
destination: z.literal(SecretSync.GCPSecretManager),
|
||||
destinationConfig: z.object({
|
||||
projectId: z.string().min(1, "Project ID required")
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user