mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
24 lines
582 B
TypeScript
24 lines
582 B
TypeScript
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 });
|
|
}
|
|
}
|