mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 18:52:06 +00:00
Restructure account api routes, fix update profile
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
const UpdateProfileSchema = z.object({
|
||||
bio: z.string().min(1, 'Bio cannot be empty'),
|
||||
bio: z.string(),
|
||||
userAvatar: z
|
||||
.instanceof(typeof FileList !== 'undefined' ? FileList : Object)
|
||||
.refine((fileList) => fileList instanceof FileList, {
|
||||
message: 'You must submit this form in a web browser.',
|
||||
})
|
||||
.refine((fileList) => [...(fileList as FileList)].length === 1, {
|
||||
message: 'You must upload one file.',
|
||||
.refine((fileList) => [...(fileList as FileList)].length <= 1, {
|
||||
message: 'You must upload only one or zero files.',
|
||||
})
|
||||
.refine(
|
||||
(fileList) =>
|
||||
Reference in New Issue
Block a user