mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: add project slug param for moving secrets on dashboard overview and environment view
This commit is contained in:
@@ -337,7 +337,7 @@ export const useMoveSecrets = ({
|
|||||||
destinationSecretPath,
|
destinationSecretPath,
|
||||||
secretIds,
|
secretIds,
|
||||||
shouldOverwrite,
|
shouldOverwrite,
|
||||||
projectId
|
projectSlug
|
||||||
}) => {
|
}) => {
|
||||||
const { data } = await apiRequest.post<{
|
const { data } = await apiRequest.post<{
|
||||||
isSourceUpdated: boolean;
|
isSourceUpdated: boolean;
|
||||||
@@ -349,7 +349,7 @@ export const useMoveSecrets = ({
|
|||||||
destinationSecretPath,
|
destinationSecretPath,
|
||||||
secretIds,
|
secretIds,
|
||||||
shouldOverwrite,
|
shouldOverwrite,
|
||||||
projectId
|
projectSlug
|
||||||
});
|
});
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ export type TDeleteSecretBatchDTO = {
|
|||||||
|
|
||||||
export type TMoveSecretsDTO = {
|
export type TMoveSecretsDTO = {
|
||||||
projectId: string;
|
projectId: string;
|
||||||
|
projectSlug: string;
|
||||||
sourceEnvironment: string;
|
sourceEnvironment: string;
|
||||||
sourceSecretPath: string;
|
sourceSecretPath: string;
|
||||||
destinationEnvironment: string;
|
destinationEnvironment: string;
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ const Content = ({
|
|||||||
secrets,
|
secrets,
|
||||||
environments,
|
environments,
|
||||||
projectId,
|
projectId,
|
||||||
|
projectSlug,
|
||||||
sourceSecretPath
|
sourceSecretPath
|
||||||
}: ContentProps) => {
|
}: ContentProps) => {
|
||||||
const [search, setSearch] = useState(sourceSecretPath);
|
const [search, setSearch] = useState(sourceSecretPath);
|
||||||
@@ -194,6 +195,7 @@ const Content = ({
|
|||||||
destinationEnvironment: environment.slug,
|
destinationEnvironment: environment.slug,
|
||||||
destinationSecretPath: value.secretPath,
|
destinationSecretPath: value.secretPath,
|
||||||
projectId,
|
projectId,
|
||||||
|
projectSlug,
|
||||||
secretIds: secretsToMove.map((sec) => sec.id)
|
secretIds: secretsToMove.map((sec) => sec.id)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -72,10 +72,7 @@ import {
|
|||||||
useMoveSecrets,
|
useMoveSecrets,
|
||||||
useUpdateSecretBatch
|
useUpdateSecretBatch
|
||||||
} from "@app/hooks/api";
|
} from "@app/hooks/api";
|
||||||
import {
|
import { dashboardKeys, fetchDashboardProjectSecretsByKeys } from "@app/hooks/api/dashboard/queries";
|
||||||
dashboardKeys,
|
|
||||||
fetchDashboardProjectSecretsByKeys
|
|
||||||
} from "@app/hooks/api/dashboard/queries";
|
|
||||||
import { UsedBySecretSyncs } from "@app/hooks/api/dashboard/types";
|
import { UsedBySecretSyncs } from "@app/hooks/api/dashboard/types";
|
||||||
import { secretApprovalRequestKeys } from "@app/hooks/api/secretApprovalRequest/queries";
|
import { secretApprovalRequestKeys } from "@app/hooks/api/secretApprovalRequest/queries";
|
||||||
import { PendingAction } from "@app/hooks/api/secretFolders/types";
|
import { PendingAction } from "@app/hooks/api/secretFolders/types";
|
||||||
@@ -349,6 +346,7 @@ export const ActionBar = ({
|
|||||||
destinationEnvironment,
|
destinationEnvironment,
|
||||||
destinationSecretPath,
|
destinationSecretPath,
|
||||||
projectId,
|
projectId,
|
||||||
|
projectSlug: currentProject.slug,
|
||||||
secretIds: secretsToMove.map((sec) => sec.id)
|
secretIds: secretsToMove.map((sec) => sec.id)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user