feat(infisical-pg): completed secret rollback

This commit is contained in:
Akhil Mohan
2024-01-27 12:38:23 +05:30
parent 784cdb4201
commit b5aa6c0000
57 changed files with 2017 additions and 453 deletions
@@ -97,6 +97,7 @@ export const SnapshotView = ({
{}
);
const diffView: Array<TDiffView<DecryptedSecret>> = [];
console.log({ rollingSecrets, secrets });
rollingSecrets.forEach((rollSecret) => {
const { id } = rollSecret;
const doesExist = Boolean(secretGroupById?.[id]);
@@ -118,9 +119,9 @@ export const SnapshotView = ({
});
return diffView;
}, [secrets, rollingSecrets]);
console.log(secretDiffView);
const handleClickRollback = async () => {
if (!snapshotData?.version) {
if (!snapshotData?.id) {
createNotification({
text: "Failed to find secret version",
type: "success"
@@ -130,7 +131,7 @@ export const SnapshotView = ({
try {
await performRollback({
workspaceId,
version: snapshotData.version,
snapshotId: snapshotData.id,
environment,
directory: secretPath
});