Fixed label display on metrics. Removed compare for all time.

This commit is contained in:
Mike Cao 2024-05-28 22:15:44 -07:00
parent cfe2389b8e
commit 7b0b11ffaa
8 changed files with 23 additions and 18 deletions

View file

@ -3,7 +3,7 @@ import { Website, Session } from '@prisma/client';
import redis from '@umami/redis-client';
export async function fetchWebsite(websiteId: string): Promise<Website> {
let website;
let website = null;
if (redis.enabled) {
website = await redis.client.fetch(`website:${websiteId}`, () => getWebsite(websiteId), 86400);
@ -19,7 +19,7 @@ export async function fetchWebsite(websiteId: string): Promise<Website> {
}
export async function fetchSession(sessionId: string): Promise<Session> {
let session;
let session = null;
if (redis.enabled) {
session = await redis.client.fetch(`session:${sessionId}`, () => getSession(sessionId), 86400);