mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
clarified var
This commit is contained in:
parent
8e068310b8
commit
c73d07d329
1 changed files with 5 additions and 5 deletions
|
|
@ -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}`));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue