From 6233b978445d334b3892dcc8283f98d3b1d886b4 Mon Sep 17 00:00:00 2001 From: Tony Vi Date: Thu, 9 Mar 2023 15:55:57 +0200 Subject: [PATCH] fix(auth): return rest params --- src/utils/prisma.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/prisma.ts b/src/utils/prisma.ts index 37952a1a9..0af3ed037 100644 --- a/src/utils/prisma.ts +++ b/src/utils/prisma.ts @@ -22,11 +22,10 @@ if (process.env.NODE_ENV !== 'production') global.prisma = prisma; */ prisma.$use(async (params, next) => { if (params.action === 'create' && params.model === 'Account') { - const { refresh_expires_in: refreshExpiresIn, ...rest } = params.args.data; + const { 'not-before-policy': value, refresh_expires_in: refreshExpiresIn, ...rest } = params.args.data; if (refreshExpiresIn !== undefined) { params.args.data = { ...rest, refresh_token_expires_in: refreshExpiresIn }; - delete params.args.data['not-before-policy']; } }