From eabb096e14e76cb644eb16c69e6ac7293b3e301e Mon Sep 17 00:00:00 2001 From: Bailey Pumfleet Date: Tue, 26 Oct 2021 16:21:08 +0100 Subject: [PATCH] Ensure you can only delete your own credentials --- pages/api/integrations.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/api/integrations.ts b/pages/api/integrations.ts index 0fad208f03..463ecd9b4f 100644 --- a/pages/api/integrations.ts +++ b/pages/api/integrations.ts @@ -37,6 +37,7 @@ export default async function handler(req, res) { await prisma.credential.delete({ where: { id: id, + userId: session.user.id, }, });