Skip to content

Commit

Permalink
fix(auth): return rest params
Browse files Browse the repository at this point in the history
  • Loading branch information
awinogradov committed Mar 9, 2023
1 parent 0feb6f8 commit 6233b97
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
}
}

Expand Down

0 comments on commit 6233b97

Please sign in to comment.