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

17 lines
295 B
JavaScript

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