import { NextResponse } from 'next/server'; import { getRedisStatus } from '@/lib/redis'; /** * API route to check Redis connection status * Used for monitoring and debugging */ export async function GET() { try { const status = await getRedisStatus(); return NextResponse.json({ ready: status.status === 'connected', status: status.status, ping: status.ping, error: status.error }); } catch (error) { return NextResponse.json({ ready: false, error: error instanceof Error ? error.message : 'Unknown error' }, { status: 500 }); } }