feat: move from upstash to redis
Some checks failed
Deploy / lint-build-deploy (push) Failing after 2m35s

This commit is contained in:
2026-01-19 18:55:22 +01:00
parent 77b9391c6d
commit be467f7403
9 changed files with 961 additions and 768 deletions

View File

@@ -11,15 +11,16 @@ export async function GET(req: Request) {
return NextResponse.json({ error: 'No key provided' }, { status: 400 });
}
const state = await redis.get(key);
const rawState = await redis.get(key);
if (!state) {
if (!rawState) {
return NextResponse.json(
{ error: 'No data found for this key' },
{ status: 404 }
);
}
const state = JSON.parse(rawState);
const validatedState = validateState(state);
return NextResponse.json({ data: validatedState });
} catch (error) {