Add Reset / Delete functionality.

This commit is contained in:
Brian Cao committed 2022-11-09 22:46:50 -08:00
1 parent 4f098a34c1
commit 30743feb0e
6 files changed
+26 -29

No files matched your search

+1 -7
View File
@@ -5,13 +5,7 @@ export async function deleteWebsite(id) {
const { client, transaction } = prisma;
return transaction([
client.pageview.deleteMany({
where: { websiteId: id },
}),
client.eventData.deleteMany({
where: { event: { websiteId: id } },
}),
client.event.deleteMany({
client.websiteEvent.deleteMany({
where: { websiteId: id },
}),
client.session.deleteMany({