umami/queries/admin/website/getUserWebsites.js
2022-08-25 22:04:32 -07:00

15 lines
256 B
JavaScript

import { prisma, runQuery } from 'lib/db/relational';
export async function getUserWebsites(user_id) {
return runQuery(
prisma.website.findMany({
where: {
user_id,
},
orderBy: {
name: 'asc',
},
}),
);
}