add user profile, profile vibe and trip vibe and social signal
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { z } from "zod/v4";
|
||||
import { LIMITS } from "@/lib/limits";
|
||||
import { VIBES } from "@/lib/vibe";
|
||||
|
||||
const optionalTrimmed = (max: number, label: string) =>
|
||||
z.preprocess(
|
||||
@@ -52,6 +53,14 @@ export const updateProfileSchema = z.object({
|
||||
`Maksimal ${LIMITS.MAX_PROFILE_INTERESTS_COUNT} minat`
|
||||
)
|
||||
.default([]),
|
||||
vibe: z.preprocess(
|
||||
(val) => {
|
||||
if (val == null) return undefined;
|
||||
const s = String(val).trim();
|
||||
return s === "" ? undefined : s;
|
||||
},
|
||||
z.enum([...VIBES]).optional()
|
||||
),
|
||||
});
|
||||
|
||||
export type UpdateProfileInput = z.infer<typeof updateProfileSchema>;
|
||||
|
||||
Reference in New Issue
Block a user