chore: move toApiLang util to hotel trpc folder

This commit is contained in:
Chuma McPhoy
2024-07-04 15:05:02 +02:00
parent 74993f6c3c
commit f89d17cd7f
3 changed files with 27 additions and 3 deletions

View File

@@ -1,8 +1,8 @@
import { z } from "zod"
import { Lang, toUppercaseLang } from "@/constants/languages"
import { Lang } from "@/constants/languages"
export const getHotelInputSchema = z.object({
hotelId: z.string(),
language: z.nativeEnum(Lang).transform((val) => toUppercaseLang(val)),
language: z.nativeEnum(Lang),
})