add user profile, profile vibe and trip vibe and social signal

This commit is contained in:
2026-05-08 19:20:27 +07:00
parent 3228ef712f
commit 7f419638b5
39 changed files with 1361 additions and 192 deletions
+9
View File
@@ -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>;