Fix: Added explicit SecretType type

This commit is contained in:
Daniel Hougaard
2024-06-21 15:23:50 +02:00
parent 9c06cab99d
commit d0f8394f50
9 changed files with 41 additions and 29 deletions
@@ -7,7 +7,7 @@ import {
} from "@app/components/utilities/cryptography/crypto";
import { apiRequest } from "@app/config/request";
import { DecryptedSecret } from "../secrets/types";
import { DecryptedSecret, SecretType } from "../secrets/types";
import {
TGetSecretSnapshotsDTO,
TSecretRollbackDTO,
@@ -112,7 +112,7 @@ export const useGetSnapshotSecrets = ({ decryptFileKey, snapshotId }: TSnapshotD
version: encSecret.version
};
if (encSecret.type === "personal") {
if (encSecret.type === SecretType.Personal) {
personalSecrets[decryptedSecret.key] = { id: encSecret.secretId, value: secretValue };
} else {
sharedSecrets.push(decryptedSecret);