import { NextResponse } from 'next/server'; import { query } from '@/lib/db'; export async function GET() { try { const rows = await query('SELECT ID, Kuerzel, Name FROM beos ORDER BY Name ASC'); return NextResponse.json(rows); } catch (error) { console.error('GET /api/beos:', error); return NextResponse.json({ error: 'Datenbankfehler' }, { status: 500 }); } }