mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Patching some bugs.
This commit is contained in:
@@ -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 }
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user