umami/queries/analytics/session/createSession.js
2022-07-12 15:14:27 -07:00

17 lines
299 B
JavaScript

import { runQuery } from 'lib/queries';
import prisma from 'lib/db';
export async function createSession(website_id, data) {
return runQuery(
prisma.session.create({
data: {
website_id,
...data,
},
select: {
session_id: true,
},
}),
);
}