mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
chore(deps): bump zod from 4.3.6 to 4.4.3 (#12563)
* chore(deps): bump zod from 4.3.6 to 4.4.3 Bumps [zod](https://github.com/colinhacks/zod) from 4.3.6 to 4.4.3. - [Release notes](https://github.com/colinhacks/zod/releases) - [Commits](https://github.com/colinhacks/zod/compare/v4.3.6...v4.4.3) --- updated-dependencies: - dependency-name: zod dependency-version: 4.4.3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix: Make files.create file param optional in schema for zod 4.4 zod 4.4 changed z.custom() to reject undefined. Since validate runs before multipart injects the file, validation failed with 400 on all files.create requests. Mark the field optional and guard in the handler. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tom Moor <tom@getoutline.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,10 @@ router.post(
|
||||
const { key } = ctx.input.body;
|
||||
const file = ctx.input.file;
|
||||
|
||||
if (!file) {
|
||||
throw ValidationError("Request must include a file parameter");
|
||||
}
|
||||
|
||||
const attachment = await Attachment.findOne({
|
||||
where: { key },
|
||||
rejectOnEmpty: true,
|
||||
|
||||
@@ -10,7 +10,7 @@ export const FilesCreateSchema = z.object({
|
||||
.refine(ValidateKey.isValid, { message: ValidateKey.message })
|
||||
.transform(ValidateKey.sanitize),
|
||||
}),
|
||||
file: z.custom<formidable.File>(),
|
||||
file: z.custom<formidable.File>().optional(),
|
||||
});
|
||||
|
||||
export type FilesCreateReq = z.infer<typeof FilesCreateSchema>;
|
||||
|
||||
Reference in New Issue
Block a user