Database refactoring.

This commit is contained in:
Mike Cao 2022-08-27 21:38:35 -07:00
parent bb184dc2cc
commit 467c7f289f
37 changed files with 566 additions and 591 deletions

View file

@ -1,14 +1,12 @@
import { prisma, runQuery } from 'lib/relational';
import prisma from 'lib/prisma';
export async function getUserWebsites(user_id) {
return runQuery(
prisma.website.findMany({
where: {
user_id,
},
orderBy: {
name: 'asc',
},
}),
);
return prisma.client.website.findMany({
where: {
user_id,
},
orderBy: {
name: 'asc',
},
});
}