Refactor API authentication.
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user