mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 09:35:37 +00:00
improvements: address feedback
This commit is contained in:
@@ -32,6 +32,7 @@ export type TSecretApprovalSecChange = {
|
||||
secretKey: string;
|
||||
secretValue?: string;
|
||||
secretComment?: string;
|
||||
isRotatedSecret?: boolean;
|
||||
tags?: string[];
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
|
||||
import { apiRequest } from "@app/config/request";
|
||||
import { dashboardKeys } from "@app/hooks/api/dashboard/queries";
|
||||
|
||||
import { SecretType, SecretV3RawSanitized } from "../secrets/types";
|
||||
import {
|
||||
@@ -82,7 +83,8 @@ export const useGetSnapshotSecrets = ({ snapshotId }: TSnapshotDataProps) =>
|
||||
createdAt: secretVersion.createdAt,
|
||||
updatedAt: secretVersion.updatedAt,
|
||||
type: "modified",
|
||||
version: secretVersion.version
|
||||
version: secretVersion.version,
|
||||
isRotatedSecret: secretVersion.isRotatedSecret
|
||||
};
|
||||
|
||||
if (secretVersion.type === SecretType.Personal) {
|
||||
@@ -162,6 +164,12 @@ export const usePerformSecretRollback = () => {
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: secretSnapshotKeys.count({ workspaceId, environment, directory })
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: dashboardKeys.getDashboardSecrets({
|
||||
projectId: workspaceId,
|
||||
secretPath: directory ?? "/"
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ export type TSecretSnapshot = {
|
||||
|
||||
export type TSnapshotData = Omit<TSecretSnapshot, "secretVersions"> & {
|
||||
id: string;
|
||||
secretVersions: SecretVersions[];
|
||||
secretVersions: (SecretVersions & { isRotatedSecret?: boolean })[];
|
||||
folderVersion: Array<{ name: string; id: string }>;
|
||||
environment: WorkspaceEnv;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user