Created /api/health endpoint that returns 200 OK to allow Redux network detection middleware to properly check connectivity status. Without this endpoint, the app was showing as offline even when connected to the internet. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
14 lines
350 B
TypeScript
14 lines
350 B
TypeScript
import { NextResponse } from 'next/server';
|
|
|
|
/**
|
|
* Health check endpoint for network status detection
|
|
* Returns 200 OK when the app is reachable
|
|
*/
|
|
export async function GET() {
|
|
return NextResponse.json({ status: 'ok', timestamp: new Date().toISOString() });
|
|
}
|
|
|
|
export async function HEAD() {
|
|
return new NextResponse(null, { status: 200 });
|
|
}
|