Merge pull request #105 from calcom/feat/uuid-hooks
feat: adds automatic generation of uuid id for webhooks create on API
This commit is contained in:
6 files changed
+8
-6
No files matched your search
@@ -11,7 +11,6 @@ declare module "next" {
|
||||
userId: number;
|
||||
method: string;
|
||||
query: { [key: string]: string | string[] };
|
||||
body: any;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { UserPermissionRole } from "@prisma/client";
|
||||
|
||||
import prisma from "@calcom/prisma";
|
||||
import { UserPermissionRole } from "@calcom/prisma/client";
|
||||
|
||||
export const isAdminGuard = async (userId: number) => {
|
||||
const user = await prisma.user.findUnique({ where: { id: userId } });
|
||||
|
||||
@@ -26,7 +26,6 @@ const schemaWebhookBaseBodyParams = Webhook.pick({
|
||||
|
||||
export const schemaWebhookCreateParams = z
|
||||
.object({
|
||||
id: z.string(),
|
||||
subscriberUrl: z.string().url(),
|
||||
eventTriggers: z.enum(WEBHOOK_TRIGGER_EVENTS).array(),
|
||||
active: z.boolean(),
|
||||
@@ -52,6 +51,7 @@ export const schemaWebhookReadPublic = Webhook.pick({
|
||||
eventTypeId: true,
|
||||
payloadTemplate: true,
|
||||
eventTriggers: true,
|
||||
/** @todo: find out how to properly add back and validate those. */
|
||||
// eventType: true,
|
||||
// app: true,
|
||||
appId: true,
|
||||
|
||||
Reference in new issue
Block a user