mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 05:07:15 +01:00
Session details screen.
This commit is contained in:
parent
c3c3b46ef6
commit
f32bf0a2e0
21 changed files with 252 additions and 33 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { getSession, getWebsite } from 'queries';
|
||||
import { getWebsiteSession, getWebsite } from 'queries';
|
||||
import { Website, Session } from '@prisma/client';
|
||||
import redis from '@umami/redis-client';
|
||||
|
||||
|
|
@ -22,9 +22,13 @@ export async function fetchSession(sessionId: string): Promise<Session> {
|
|||
let session = null;
|
||||
|
||||
if (redis.enabled) {
|
||||
session = await redis.client.fetch(`session:${sessionId}`, () => getSession(sessionId), 86400);
|
||||
session = await redis.client.fetch(
|
||||
`session:${sessionId}`,
|
||||
() => getWebsiteSession(sessionId),
|
||||
86400,
|
||||
);
|
||||
} else {
|
||||
session = await getSession(sessionId);
|
||||
session = await getWebsiteSession(sessionId);
|
||||
}
|
||||
|
||||
if (!session) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue