mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 17:30:06 +00:00
feat(infisical-pg): completed secret rollback
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user