Patching some bugs.

This commit is contained in:
charles-gauthereau
2025-01-03 20:48:58 +01:00
parent 7193f5b71f
commit c733fb4fdc
11 changed files with 273 additions and 32 deletions
+32
View File
@@ -0,0 +1,32 @@
import {NextResponse} from "next/server";
export type BodyInit = {
initialize: boolean
}
export async function POST(
request: Request,
) {
try {
const body: BodyInit = await request.json();
console.log(body)
return NextResponse.json(
{
message: "Initialization successfully done!",
},
{ status: 200 }
);
} catch (error) {
console.error("Error in POST initialization:", error);
return NextResponse.json(
{ error: "Internal server error" },
{ status: 500 }
);
}
}