mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 18:28:27 +00:00
Fix bug with updating overwritten secrets
This commit is contained in:
@@ -1116,6 +1116,7 @@ export const updateSecretByName = async (req: Request, res: Response) => {
|
|||||||
authData: req.authData
|
authData: req.authData
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (secretReminderCron !== undefined) {
|
||||||
if (
|
if (
|
||||||
(secretReminderCron && existingSecret.secretReminderCron !== secretReminderCron) ||
|
(secretReminderCron && existingSecret.secretReminderCron !== secretReminderCron) ||
|
||||||
(secretReminderNote && existingSecret.secretReminderNote !== secretReminderNote)
|
(secretReminderNote && existingSecret.secretReminderNote !== secretReminderNote)
|
||||||
@@ -1137,6 +1138,7 @@ export const updateSecretByName = async (req: Request, res: Response) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (type !== "personal") {
|
if (type !== "personal") {
|
||||||
const existingSecret = await SecretService.getSecret({
|
const existingSecret = await SecretService.getSecret({
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ export const UpdateSecretByNameV3 = z.object({
|
|||||||
.trim()
|
.trim()
|
||||||
.optional()
|
.optional()
|
||||||
.nullable()
|
.nullable()
|
||||||
.refine((val) => val === null || (val && isValidCron(val))),
|
.refine((val) => val === null || val === undefined || (val && isValidCron(val))),
|
||||||
secretReminderNote: z.string().trim().nullable().optional(),
|
secretReminderNote: z.string().trim().nullable().optional(),
|
||||||
|
|
||||||
tags: z.string().array().optional(),
|
tags: z.string().array().optional(),
|
||||||
|
|||||||
Reference in New Issue
Block a user