V 2.0.0 ferige Version

This commit is contained in:
rxf
2026-03-16 09:20:30 +01:00
parent 244544492f
commit 889ed597ae
37 changed files with 1146 additions and 118 deletions

23
app/api/data/route.ts Normal file
View File

@@ -0,0 +1,23 @@
import { NextRequest, NextResponse } from 'next/server';
import { doMySQL } from '@/lib/mysqlinterface';
export async function GET(request: NextRequest) {
const searchParams = request.nextUrl.searchParams;
const options = {
curdate: searchParams.get('curdate') ?? undefined,
testing: searchParams.get('test') ?? undefined,
};
const erg = await doMySQL('getlastdata', options);
return NextResponse.json(erg);
}
export async function POST(request: NextRequest) {
const searchParams = request.nextUrl.searchParams;
const body = await request.json();
const options = {
data: body,
testing: searchParams.get('test') ?? undefined,
};
const erg = await doMySQL('putdata', options);
return NextResponse.json(erg);
}