Merge branch 'dev' into analytics
commit
a33706585b
|
@ -161,6 +161,9 @@ export async function deleteUser(
|
||||||
|
|
||||||
return prisma
|
return prisma
|
||||||
.transaction([
|
.transaction([
|
||||||
|
client.eventData.deleteMany({
|
||||||
|
where: { websiteId: { in: websiteIds } },
|
||||||
|
}),
|
||||||
client.websiteEvent.deleteMany({
|
client.websiteEvent.deleteMany({
|
||||||
where: { websiteId: { in: websiteIds } },
|
where: { websiteId: { in: websiteIds } },
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -78,6 +78,9 @@ export async function deleteWebsite(
|
||||||
const cloudMode = process.env.CLOUD_MODE;
|
const cloudMode = process.env.CLOUD_MODE;
|
||||||
|
|
||||||
return transaction([
|
return transaction([
|
||||||
|
client.eventData.deleteMany({
|
||||||
|
where: { websiteId },
|
||||||
|
}),
|
||||||
client.websiteEvent.deleteMany({
|
client.websiteEvent.deleteMany({
|
||||||
where: { websiteId },
|
where: { websiteId },
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -35,7 +35,7 @@ function clickhouseQuery(websiteId: string, startAt: Date, eventType: number) {
|
||||||
url_path,
|
url_path,
|
||||||
event_name as eventName
|
event_name as eventName
|
||||||
from website_event
|
from website_event
|
||||||
where event_type = {eventType:Uint32}
|
where event_type = {eventType:UInt32}
|
||||||
and website_id = {websiteId:UUID}
|
and website_id = {websiteId:UUID}
|
||||||
and created_at >= {startAt:DateTime('UTC')}`,
|
and created_at >= {startAt:DateTime('UTC')}`,
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue