Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

clarified var

Brian Caoc73d07d32944
diff --git a/lib/session.js b/lib/session.js
index 883726e7b..7feafc151 100644
--- a/lib/session.js
+++ b/lib/session.js
@@ -8,8 +8,8 @@ import clickhouse from 'lib/clickhouse';
export async function getSession(req) {
const { payload } = getJsonBody(req);
- const isRedis = redis.client;
- const isClickhouse = clickhouse.client;
+ const hasRedis = redis.client;
+ const hasClickhouse = clickhouse.client;
if (!payload) {
throw new Error('Invalid request');
@@ -34,7 +34,7 @@ export async function getSession(req) {
let websiteId = null;
// Check if website exists
- if (isRedis) {
+ if (hasRedis) {
websiteId = Number(await redis.client.get(`website:${website_uuid}`));
}
@@ -54,9 +54,9 @@ export async function getSession(req) {
let sessionId = null;
let session = null;
- if (!isClickhouse) {
+ if (!hasClickhouse) {
// Check if session exists
- if (isRedis) {
+ if (hasRedis) {
sessionId = Number(await redis.client.get(`session:${session_uuid}`));
}