mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 23:47:06 +00:00
misc: added audit log and overwrite feature
This commit is contained in:
@@ -383,22 +383,34 @@ export const useMoveSecrets = ({
|
||||
} = {}) => {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
return useMutation<{}, {}, TMoveSecretsDTO>({
|
||||
return useMutation<
|
||||
{
|
||||
isSourceUpdated: boolean;
|
||||
isDestinationUpdated: boolean;
|
||||
},
|
||||
{},
|
||||
TMoveSecretsDTO
|
||||
>({
|
||||
mutationFn: async ({
|
||||
sourceEnvironment,
|
||||
sourceSecretPath,
|
||||
projectSlug,
|
||||
destinationEnvironment,
|
||||
destinationSecretPath,
|
||||
secretIds
|
||||
secretIds,
|
||||
shouldOverwrite
|
||||
}) => {
|
||||
const { data } = await apiRequest.post("/api/v3/secrets/move", {
|
||||
const { data } = await apiRequest.post<{
|
||||
isSourceUpdated: boolean;
|
||||
isDestinationUpdated: boolean;
|
||||
}>("/api/v3/secrets/move", {
|
||||
sourceEnvironment,
|
||||
sourceSecretPath,
|
||||
projectSlug,
|
||||
destinationEnvironment,
|
||||
destinationSecretPath,
|
||||
secretIds
|
||||
secretIds,
|
||||
shouldOverwrite
|
||||
});
|
||||
|
||||
return data;
|
||||
|
||||
@@ -185,6 +185,7 @@ export type TMoveSecretsDTO = {
|
||||
destinationEnvironment: string;
|
||||
destinationSecretPath: string;
|
||||
secretIds: string[];
|
||||
shouldOverwrite: boolean;
|
||||
};
|
||||
|
||||
export type CreateSecretDTO = {
|
||||
|
||||
Reference in New Issue
Block a user