umami/queries/admin/website/createWebsite.js
2022-07-15 16:47:38 -07:00

17 lines
284 B
JavaScript

import { prisma, runQuery } from 'lib/db';
export async function createWebsite(user_id, data) {
return runQuery(
prisma.website.create({
data: {
account: {
connect: {
user_id,
},
},
...data,
},
}),
);
}