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!

fixed an issue when wrong value was stored to redis for the getRedisCount func

Blue Mouseca5e0e1841e3
diff --git a/apps/production/src/project/project.service.ts b/apps/production/src/project/project.service.ts
index 375f4b607..2e33d879d 100644
--- a/apps/production/src/project/project.service.ts
+++ b/apps/production/src/project/project.service.ts
@@ -157,7 +157,6 @@ export class ProjectService {
},
relations: ['user'],
})
- // @ts-ignore
project = { ...project, share }
await redis.set(
@@ -174,8 +173,7 @@ export class ProjectService {
}
}
- // @ts-ignore
- return project
+ return project as Project
}
async paginate(
@@ -451,13 +449,12 @@ export class ProjectService {
await redis.set(
countKey,
- `${pageviews}`,
+ `${count}`,
'EX',
redisProjectCountCacheTimeout,
)
} else {
try {
- // @ts-ignore
count = Number(count)
} catch (reason) {
count = 0