Refactor API authentication.

This commit is contained in:
Mike Cao 2022-10-12 13:11:44 -07:00
parent c33729e185
commit 5a4fc96ebc
13 changed files with 71 additions and 73 deletions

View file

@ -1,10 +1,8 @@
import prisma from 'lib/prisma';
export async function updateAccount(userId, data) {
export async function updateAccount(data, where) {
return prisma.client.account.update({
where: {
id: userId,
},
where,
data,
});
}