Update secrets.ts

This commit is contained in:
Daniel Hougaard
2023-11-28 13:50:47 +04:00
parent 64d862ebe9
commit 8851987ac4

View File

@@ -10,7 +10,6 @@ import { AuthData } from "../interfaces/middleware";
import { ActorType } from "../ee/models";
import { z } from "zod";
import { SECRET_PERSONAL, SECRET_SHARED } from "../variables";
import { isValidCron } from "cron-validator";
/**
* Validate authenticated clients for secrets with id [secretId] based
* on any known permissions.
@@ -363,12 +362,7 @@ export const UpdateSecretByNameV3 = z.object({
secretCommentIV: z.string().trim().optional(),
secretCommentTag: z.string().trim().optional(),
secretReminderCron: z
.string()
.trim()
.optional()
.nullable()
.refine((val) => val === null || val === undefined || (val && isValidCron(val))),
secretReminderRepeatDays: z.number().min(1).max(365).optional().nullable(),
secretReminderNote: z.string().trim().nullable().optional(),
tags: z.string().array().optional(),