Merge branch 'dev' into analytics

This commit is contained in:
Mike Cao committed 2023-04-07 11:49:31 -07:00
commit a33706585b
3 files changed
+7 -1

No files matched your search

+3
View File
@@ -161,6 +161,9 @@ export async function deleteUser(
return prisma
.transaction([
client.eventData.deleteMany({
where: { websiteId: { in: websiteIds } },
}),
client.websiteEvent.deleteMany({
where: { websiteId: { in: websiteIds } },
}),
+3
View File
@@ -78,6 +78,9 @@ export async function deleteWebsite(
const cloudMode = process.env.CLOUD_MODE;
return transaction([
client.eventData.deleteMany({
where: { websiteId },
}),
client.websiteEvent.deleteMany({
where: { websiteId },
}),
+1 -1
View File
@@ -35,7 +35,7 @@ function clickhouseQuery(websiteId: string, startAt: Date, eventType: number) {
url_path,
event_name as eventName
from website_event
where event_type = {eventType:Uint32}
where event_type = {eventType:UInt32}
and website_id = {websiteId:UUID}
and created_at >= {startAt:DateTime('UTC')}`,
{