api and lib fixes (#1643)
This commit is contained in:
@@ -6,16 +6,16 @@ export async function deleteWebsite(id) {
|
||||
|
||||
return transaction([
|
||||
client.pageview.deleteMany({
|
||||
where: { session: { website: { id } } },
|
||||
where: { websiteId: id },
|
||||
}),
|
||||
client.eventData.deleteMany({
|
||||
where: { event: { session: { website: { id } } } },
|
||||
where: { event: { websiteId: id } },
|
||||
}),
|
||||
client.event.deleteMany({
|
||||
where: { session: { website: { id } } },
|
||||
where: { websiteId: id },
|
||||
}),
|
||||
client.session.deleteMany({
|
||||
where: { website: { id } },
|
||||
where: { websiteId: id },
|
||||
}),
|
||||
client.website.delete({
|
||||
where: { id },
|
||||
|
||||
@@ -5,16 +5,16 @@ export async function resetWebsite(id) {
|
||||
|
||||
return transaction([
|
||||
client.pageview.deleteMany({
|
||||
where: { session: { website: { id } } },
|
||||
where: { websiteId: id },
|
||||
}),
|
||||
client.eventData.deleteMany({
|
||||
where: { event: { session: { website: { id } } } },
|
||||
where: { event: { websiteId: id } },
|
||||
}),
|
||||
client.event.deleteMany({
|
||||
where: { session: { website: { id } } },
|
||||
where: { websiteId: id },
|
||||
}),
|
||||
client.session.deleteMany({
|
||||
where: { website: { id } },
|
||||
where: { websiteId: id },
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user