2022-03-26 00:53:56 +00:00
|
|
|
import { withValidation } from "next-validations";
|
|
|
|
import { z } from "zod";
|
|
|
|
|
|
|
|
const schemaTeam = z
|
|
|
|
.object({
|
|
|
|
slug: z.string().min(3),
|
|
|
|
name: z.string().min(3),
|
|
|
|
hideBranding: z.boolean().default(false),
|
|
|
|
bio: z.string().min(3).optional(),
|
|
|
|
logo: z.string().optional(),
|
|
|
|
})
|
2022-03-30 12:17:55 +00:00
|
|
|
.strict();
|
2022-03-26 00:53:56 +00:00
|
|
|
const withValidTeam = withValidation({
|
|
|
|
schema: schemaTeam,
|
|
|
|
type: "Zod",
|
|
|
|
mode: "body",
|
|
|
|
});
|
|
|
|
|
|
|
|
export { schemaTeam, withValidTeam };
|