import { NextResponse } from 'next/server'; import { getSession } from '@/lib/session'; export async function GET() { const session = await getSession(); if (!session) return NextResponse.json({ error: 'Nicht angemeldet' }, { status: 401 }); const temp = Math.round((8 + Math.random() * 15) * 10) / 10; const feuchte = Math.round((40 + Math.random() * 50) * 10) / 10; const druck = Math.round((990 + Math.random() * 30) * 10) / 10; return NextResponse.json({ temp, feuchte, druck }); }