diff --git a/backend/src/controllers/v2/secretsController.ts b/backend/src/controllers/v2/secretsController.ts index 30748cb3f..69cacd75c 100644 --- a/backend/src/controllers/v2/secretsController.ts +++ b/backend/src/controllers/v2/secretsController.ts @@ -273,7 +273,7 @@ export const updateSecrets = async (req: Request, res: Response) => { }); await Secret.bulkWrite(ops); - let newSecretsObj: { [key: string]: PatchSecret } = {}; + const newSecretsObj: { [key: string]: PatchSecret } = {}; req.body.secrets.forEach((secret: PatchSecret) => { newSecretsObj[secret.id] = secret; }); @@ -323,7 +323,7 @@ export const updateSecrets = async (req: Request, res: Response) => { // group secrets into workspaces so updated secrets can // be logged and snapshotted separately for each workspace - let workspaceSecretObj: any = {}; + const workspaceSecretObj: any = {}; req.secrets.forEach((s: any) => { if (s.workspace.toString() in workspaceSecretObj) { workspaceSecretObj[s.workspace.toString()].push(s); @@ -399,7 +399,7 @@ export const deleteSecrets = async (req: Request, res: Response) => { // group secrets into workspaces so deleted secrets can // be logged and snapshotted separately for each workspace - let workspaceSecretObj: any = {}; + const workspaceSecretObj: any = {}; req.secrets.forEach((s: any) => { if (s.workspace.toString() in workspaceSecretObj) { workspaceSecretObj[s.workspace.toString()].push(s); @@ -445,7 +445,7 @@ export const deleteSecrets = async (req: Request, res: Response) => { } }); - return res.status(400).send({ + return res.status(200).send({ secrets: req.secrets }); } \ No newline at end of file diff --git a/backend/src/routes/v2/secrets.ts b/backend/src/routes/v2/secrets.ts index 73461d9cd..1f68d4420 100644 --- a/backend/src/routes/v2/secrets.ts +++ b/backend/src/routes/v2/secrets.ts @@ -138,7 +138,7 @@ router.patch( router.delete( '/', [ - check('secretIds') + body('secretIds') .exists() .custom((value) => { // case: delete 1 secret diff --git a/backend/src/services/PostHogClient.ts b/backend/src/services/PostHogClient.ts index 4ce0117f0..0d91a1c13 100644 --- a/backend/src/services/PostHogClient.ts +++ b/backend/src/services/PostHogClient.ts @@ -7,12 +7,12 @@ import { } from '../config'; import { getLogger } from '../utils/logger'; -if(TELEMETRY_ENABLED){ +if(!TELEMETRY_ENABLED){ getLogger("backend-main").info([ "", - "Infisical collects telemetry data about general usage.", - "The data helps us understand how the product is doing and guide our product development to create the best possible platform; it also helps us demonstrate growth for investors as we support Infisical as open-source software.", - "To opt out of telemetry, you can set `TELEMETRY_ENABLED=false` within the environment variables", + "To improve, Infisical collects telemetry data about general usage.", + "This helps us understand how the product is doing and guide our product development to create the best possible platform; it also helps us demonstrate growth as we support Infisical as open-source software.", + "To opt into telemetry, you can set `TELEMETRY_ENABLED=true` within the environment variables.", ].join('\n')) } diff --git a/frontend/components/basic/Toggle.tsx b/frontend/components/basic/Toggle.tsx index d15aed622..c9957cc3c 100644 --- a/frontend/components/basic/Toggle.tsx +++ b/frontend/components/basic/Toggle.tsx @@ -34,7 +34,7 @@ interface ToggleProps { * @param {string} obj.value - value of a certain secret * @param {number} obj.pos - position of a certain secret #TODO: make the secret id persistent? - * @param {string} obj.id - id of a certain secret + * @param {string} obj.id - id of a certain secret (NOTE: THIS IS THE ID OF THE MAIN SECRET - NOT OF AN OVERRIDE) * @param {function} obj.deleteOverride - a function that deleted an override for a certain secret * @param {string[]} obj.sharedToHide - an array of shared secrets that we want to hide visually because they are overriden. * @param {function} obj.setSharedToHide - a function that updates the array of secrets that we want to hide visually diff --git a/frontend/components/dashboard/CommentField.tsx b/frontend/components/dashboard/CommentField.tsx index ea29aa73c..62ff0c2f1 100644 --- a/frontend/components/dashboard/CommentField.tsx +++ b/frontend/components/dashboard/CommentField.tsx @@ -6,10 +6,10 @@ import { useTranslation } from "next-i18next"; const CommentField = ({ comment, modifyComment, position }: { comment: string; modifyComment: (value: string, posistion: number) => void; position: number;}) => { const { t } = useTranslation(); - return
-

{t("dashboard:sidebar.comments")}

+ return
+

{t("dashboard:sidebar.comments")}