Skip to content

📈 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!

remove useless comments

Blue Moused586ff7aca34
diff --git a/backend/apps/cloud/src/project/gsc.controller.ts b/backend/apps/cloud/src/project/gsc.controller.ts
index 2f0d615b5..1bc5f70b6 100644
--- a/backend/apps/cloud/src/project/gsc.controller.ts
+++ b/backend/apps/cloud/src/project/gsc.controller.ts
@@ -40,7 +40,6 @@ export class GSCController {
@Post(':pid/connect')
@Auth()
async connect(@Param('pid') pid: string, @CurrentUserId() uid: string) {
- // ensure user can manage project
const project = await this.projectService.getRedisProject(pid)
this.projectService.allowedToManage(project, uid)
return this.gscService.generateConnectURL(uid, pid)
diff --git a/backend/apps/cloud/src/project/gsc.service.ts b/backend/apps/cloud/src/project/gsc.service.ts
index f04f3c084..3288445e1 100644
--- a/backend/apps/cloud/src/project/gsc.service.ts
+++ b/backend/apps/cloud/src/project/gsc.service.ts
@@ -87,14 +87,13 @@ export class GSCService {
const { tokens } = await oauth2Client.getToken(code)
oauth2Client.setCredentials(tokens)
- // Try to fetch connected Google account email
let accountEmail: string | null = null
try {
const oauth2 = google.oauth2({ version: 'v2', auth: oauth2Client })
const { data } = await oauth2.userinfo.get({})
accountEmail = (data as any)?.email || null
} catch {
- // ignore email fetch failures
+ //
}
const toStore: StoredTokens = {
@@ -108,12 +107,10 @@ export class GSCService {
await this.setStoredTokens(pid, toStore)
- // Persist connected account email separately
await this.projectService.update({ id: pid }, {
gscAccountEmail: accountEmail,
} as any)
- // One-time state
await redis.del(REDIS_STATE_PREFIX + state)
return { pid }