diff --git a/app/api/logbuch/route.ts b/app/api/logbuch/route.ts index 72d88e7..bf73da3 100644 --- a/app/api/logbuch/route.ts +++ b/app/api/logbuch/route.ts @@ -29,8 +29,8 @@ export async function GET(request: NextRequest) { if (!session) return NextResponse.json({ error: 'Nicht angemeldet' }, { status: 401 }); const { searchParams } = new URL(request.url); const kuppel = searchParams.get('kuppel') || 'West'; - const limit = Math.min(parseInt(searchParams.get('limit') || '10'), 100); - const offset = Math.max(0, parseInt(searchParams.get('offset') || '0')); + const limit = Math.min(parseInt(searchParams.get('limit') || '10') || 10, 100); + const offset = Math.max(0, parseInt(searchParams.get('offset') || '0') || 0); const month = searchParams.get('month') || ''; let listWhere = 'WHERE l.Kuppel = ?';