umami/queries/admin/website/getUserWebsites.js
2022-07-12 15:14:27 -07:00

16 lines
271 B
JavaScript

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