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

18 lines
310 B
JavaScript

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