fix: make isAdmin require req.prisma too

This commit is contained in:
Agusti Fernandez Pardo
2022-06-18 03:03:13 +02:00
parent cc534a2914
commit 60688e2e91
8 changed files with 10 additions and 12 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ export type GetSubscriberOptions = {
eventTypeId: number;
triggerEvent: WebhookTriggerEvents;
};
/** @note will this not work with custom prisma? since we're importing prisma directly and not passing it from request here **/
const getWebhooks = async (options: GetSubscriberOptions) => {
const { userId, eventTypeId } = options;
const allWebhooks = await prisma.webhook.findMany({