Updated redis logic.
This commit is contained in:
1 parent
39e7ceac06
commit
4d6ec631f7
9 files changed
+52
-46
No files matched your search
@@ -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 });
|
||||
|
||||
Reference in new issue
Block a user