Scheduling infrastructure for absolutely everyone.
Add missing bodyUserId
zomars6522600c426b
diff --git a/pages/api/webhooks/[id]/_patch.ts b/pages/api/webhooks/[id]/_patch.tsindex dbcc8c83062..cb645e43635 100644--- a/pages/api/webhooks/[id]/_patch.ts+++ b/pages/api/webhooks/[id]/_patch.ts@@ -50,9 +50,9 @@ export async function patchHandler(req: NextApiRequest) {if (!isAdmin && bodyUserId) throw new HttpError({ statusCode: 403, message: `ADMIN required for userId` });if (isAdmin && bodyUserId) {- const where: Prisma.UserWhereInput = { id: userId };+ const where: Prisma.UserWhereInput = { id: bodyUserId };await prisma.user.findFirstOrThrow({ where });- args.data.userId = userId;+ args.data.userId = bodyUserId;}const result = await prisma.webhook.update(args);