feat: adds module transpiling so api can require @calcom/prisma and not @prisma/client directly
This commit is contained in:
1 parent
a2817a2fee
commit
c2234593db
10 files changed
+183
-3
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { withValidation } from "next-validations";
|
||||
import { z } from "zod";
|
||||
|
||||
const schemaApiKey = z
|
||||
.object({
|
||||
expiresAt: z.date().optional(), // default is 30 days
|
||||
note: z.string().min(1).optional(),
|
||||
})
|
||||
.strict(); // Adding strict so that we can disallow passing in extra fields
|
||||
const withValidApiKey = withValidation({
|
||||
schema: schemaApiKey,
|
||||
type: "Zod",
|
||||
mode: "body",
|
||||
});
|
||||
|
||||
export { schemaApiKey, withValidApiKey };
|
||||
Reference in new issue
Block a user