Skip to content

Commit a527948

Browse files
committed
Using shorthand z.base64() for the corresponding ez.file().
1 parent 2c5635a commit a527948

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

express-zod-api/src/file-schema.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ const variants = {
1010
buffer: () => bufferSchema.brand(ezFileBrand as symbol),
1111
string: () => z.string().brand(ezFileBrand as symbol),
1212
binary: () => bufferSchema.or(z.string()).brand(ezFileBrand as symbol),
13-
base64: () =>
14-
z
15-
.string()
16-
.base64()
17-
.brand(ezFileBrand as symbol),
13+
base64: () => z.base64().brand(ezFileBrand as symbol),
1814
};
1915

2016
type Variants = typeof variants;

0 commit comments

Comments
 (0)