Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Delete event_data on website reset

Francis Cao0d567ebe603c
diff --git a/queries/admin/website.ts b/queries/admin/website.ts
index 8c381d6db..8714d8c98 100644
--- a/queries/admin/website.ts
+++ b/queries/admin/website.ts
@@ -50,6 +50,9 @@ export async function resetWebsite(
const { client, transaction } = prisma;
return transaction([
+ client.eventData.deleteMany({
+ where: { websiteId },
+ }),
client.websiteEvent.deleteMany({
where: { websiteId },
}),