📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
don't use email for lookup
Blue Mouse15e1f4ea4045
diff --git a/backend/apps/cloud/src/project/project.service.ts b/backend/apps/cloud/src/project/project.service.tsindex a20746b38..4c4b82957 100644--- a/backend/apps/cloud/src/project/project.service.ts+++ b/backend/apps/cloud/src/project/project.service.ts@@ -1031,16 +1031,6 @@ export class ProjectService {await deleteProjectsRedis(pids)}- async clearProjectsRedisCacheByEmail(email: string): Promise<void> {- const user = await this.userService.findOne({ where: { email } })-- if (!user) {- return- }-- await this.clearProjectsRedisCache(user.id)- }-async clearProjectsRedisCacheBySubId(subID: string): Promise<void> {const user = await this.userService.findOne({ where: { subID } })diff --git a/backend/apps/cloud/src/webhook/webhook.controller.ts b/backend/apps/cloud/src/webhook/webhook.controller.tsindex d21549094..0f37fd3fe 100644--- a/backend/apps/cloud/src/webhook/webhook.controller.ts+++ b/backend/apps/cloud/src/webhook/webhook.controller.ts@@ -175,13 +175,8 @@ export class WebhookController {...statusParams,}- if (uid) {- await this.userService.update(uid, updateParams)- await this.projectService.clearProjectsRedisCache(uid)- } else {- await this.userService.updateByEmail(email, updateParams)- await this.projectService.clearProjectsRedisCacheByEmail(email)- }+ await this.userService.update(currentUser.id, updateParams)+ await this.projectService.clearProjectsRedisCache(currentUser.id)if (status === 'paused') {await this.mailerService.sendEmail(