mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 21:27:20 +01:00
Updated redis logic.
This commit is contained in:
parent
39e7ceac06
commit
4d6ec631f7
9 changed files with 52 additions and 46 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { redisEnabled } from '@umami/redis-client';
|
||||
import redis from '@/lib/redis';
|
||||
import { json } from '@/lib/response';
|
||||
import { parseRequest } from '@/lib/request';
|
||||
import { saveAuth } from '@/lib/auth';
|
||||
|
|
@ -10,7 +10,7 @@ export async function POST(request: Request) {
|
|||
return error();
|
||||
}
|
||||
|
||||
if (redisEnabled) {
|
||||
if (redis.enabled) {
|
||||
const token = await saveAuth({ userId: auth.user.id }, 86400);
|
||||
|
||||
return json({ user: auth.user, token });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue