mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
use uuid
This commit is contained in:
parent
246e4e5f4f
commit
17041efaae
73 changed files with 491 additions and 874 deletions
|
|
@ -1,20 +1,20 @@
|
|||
import prisma from 'lib/prisma';
|
||||
|
||||
export async function resetWebsite(websiteId) {
|
||||
export async function resetWebsite(id) {
|
||||
const { client, transaction } = prisma;
|
||||
|
||||
return transaction([
|
||||
client.pageview.deleteMany({
|
||||
where: { session: { website: { websiteUuid: websiteId } } },
|
||||
where: { session: { website: { id } } },
|
||||
}),
|
||||
client.eventData.deleteMany({
|
||||
where: { event: { session: { website: { websiteUuid: websiteId } } } },
|
||||
where: { event: { session: { website: { id } } } },
|
||||
}),
|
||||
client.event.deleteMany({
|
||||
where: { session: { website: { websiteUuid: websiteId } } },
|
||||
where: { session: { website: { id } } },
|
||||
}),
|
||||
client.session.deleteMany({
|
||||
where: { website: { websiteUuid: websiteId } },
|
||||
where: { website: { id } },
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue