mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Update encryptSecrets.ts
This commit is contained in:
@@ -3,6 +3,7 @@ import crypto from "crypto";
|
||||
import { SecretDataProps, Tag } from "public/data/frequentInterfaces";
|
||||
|
||||
import { fetchUserWsKey } from "@app/hooks/api/keys/queries";
|
||||
import { SecretType } from "@app/hooks/api/types";
|
||||
|
||||
import { decryptAssymmetric, encryptSymmetric } from "../cryptography/crypto";
|
||||
|
||||
@@ -20,7 +21,7 @@ interface EncryptedSecretProps {
|
||||
secretValueCiphertext: string;
|
||||
secretValueIV: string;
|
||||
secretValueTag: string;
|
||||
type: "personal" | "shared";
|
||||
type: SecretType;
|
||||
tags: Tag[];
|
||||
}
|
||||
|
||||
@@ -108,8 +109,8 @@ const encryptSecrets = async ({
|
||||
secretCommentTag,
|
||||
type:
|
||||
secret.valueOverride === undefined || secret?.value !== secret?.valueOverride
|
||||
? "shared"
|
||||
: "personal",
|
||||
? SecretType.Shared
|
||||
: SecretType.Personal,
|
||||
tags: secret.tags
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user