2022-03-26 23:58:22 +00:00
|
|
|
import { withValidation } from "next-validations";
|
|
|
|
|
2022-03-30 15:37:51 +00:00
|
|
|
import { _CredentialModel as Credential } from "@calcom/prisma/zod";
|
|
|
|
|
|
|
|
export const schemaCredentialBodyParams = Credential.omit({ id: true });
|
|
|
|
|
|
|
|
export const schemaCredentialPublic = Credential.omit({});
|
|
|
|
|
|
|
|
export const withValidCredential = withValidation({
|
|
|
|
schema: schemaCredentialBodyParams,
|
2022-03-26 23:58:22 +00:00
|
|
|
type: "Zod",
|
|
|
|
mode: "body",
|
|
|
|
});
|