umami/queries/admin/website/createWebsite.js
2022-08-25 22:20:30 -07:00

17 lines
292 B
JavaScript

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