feat: add admin slip management pages and update navbar styles

This commit is contained in:
2026-02-05 08:22:51 +07:00 Unverified
parent 3b74689836
commit 18fd204b6e
11 changed files with 396 additions and 11 deletions
+9 -2
View File
@@ -21,7 +21,14 @@ export async function GET(
>,
);
if (!res.playerInfo) return Response.json(res);
if (res.ttl)
await redis.setex(`enka:${uid}`, res.ttl - 2, JSON.stringify(res));
if (res.ttl) {
const ttl = res.ttl - 2;
await redis.setex(
`enka:${uid}`,
// sometimes it goes crazy
Number.isNaN(ttl) || ttl < 0 || ttl > 1000 ? 60 : ttl,
JSON.stringify(res),
);
}
return Response.json(res);
}