Heb er een PWA van gemaakt en layout gecorrigeerd

This commit is contained in:
LogJurgenR
2026-08-19 16:46:29 +02:00
parent d3cab99d86
commit 686339325e
21 changed files with 1629 additions and 103 deletions
+26
View File
@@ -0,0 +1,26 @@
import { NextResponse } from "next/server";
import { SESSION_COOKIE } from "@/lib/auth";
export async function POST(request: Request) {
const body = await request.json().catch(() => null);
if (body?.username !== "admin" || body?.password !== "admin") {
return NextResponse.json(
{ error: "invalid_credentials" },
{ status: 401 },
);
}
const response = NextResponse.json({ success: true });
response.cookies.set({
name: SESSION_COOKIE,
value: "authenticated",
httpOnly: true,
sameSite: "lax",
secure: process.env.NODE_ENV === "production",
maxAge: 60 * 60 * 8,
path: "/",
});
return response;
}