From 9af022b663a3934be502c64a80eeacb1a094d7cd Mon Sep 17 00:00:00 2001 From: zomars Date: Wed, 25 Jan 2023 14:14:43 -0700 Subject: [PATCH] Fix for multi-tenant users --- lib/helpers/customPrisma.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/helpers/customPrisma.ts b/lib/helpers/customPrisma.ts index a09eda7a40..466d6ee8c0 100644 --- a/lib/helpers/customPrisma.ts +++ b/lib/helpers/customPrisma.ts @@ -34,6 +34,7 @@ export const customPrismaClient: NextMiddleware = async (req, res, next) => { */ req.isAdmin = true; req.isCustomPrisma = true; - + // We don't need the key from here and on. Prevents unrecognized key errors. + delete req.query.key; await next(); };