mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-16 02:05:04 +01:00
17 lines
299 B
JavaScript
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,
|
|
},
|
|
}),
|
|
);
|
|
}
|