feat: adds automatic generation of uuid id for webhooks create on API

This commit is contained in:
Agusti Fernandez Pardo committed 2022-06-01 17:05:33 +02:00
1 parent 7f42cc8479
commit 43b94d3e96
5 files changed
+7 -6

No files matched your search

-1
View File
@@ -11,7 +11,6 @@ declare module "next" {
userId: number;
method: string;
query: { [key: string]: string | string[] };
body: any;
}
}
+2 -1
View File
@@ -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 } });
+1 -1
View File
@@ -26,7 +26,7 @@ const schemaWebhookBaseBodyParams = Webhook.pick({
export const schemaWebhookCreateParams = z
.object({
id: z.string(),
// id: z.string(),
subscriberUrl: z.string().url(),
eventTriggers: z.enum(WEBHOOK_TRIGGER_EVENTS).array(),
active: z.boolean(),