Updated redis logic.

This commit is contained in:
Mike Cao committed 2025-02-10 21:07:18 -08:00
1 parent 39e7ceac06
commit 4d6ec631f7
9 files changed
+52 -46

No files matched your search

+3 -5
View File
@@ -1,13 +1,11 @@
import { getClient, redisEnabled } from '@umami/redis-client';
import redis from '@/lib/redis';
import { ok } from '@/lib/response';
export async function POST(request: Request) {
if (redisEnabled) {
const redis = getClient();
if (redis.enabled) {
const token = request.headers.get('authorization')?.split(' ')?.[1];
await redis.del(token);
await redis.client.del(token);
}
return ok();