This commit is contained in:
sijinhui
2024-04-03 00:08:35 +08:00
parent ec48c7ff19
commit 66c5852dbf
2 changed files with 39 additions and 18 deletions

View File

@@ -9,14 +9,6 @@ async function handle(
) {
try {
const request_data = await req.json();
// console.log("log", request_data);
// if (request_data?.userName) {
// await insertUser({
// name: request_data?.userName,
// email: request_data?.userName,
// });
// }
// console.log("===========4", request_data);
try {
if (request_data?.logEntry) {
const regex_message = /(?<="content":")(.*?)(?="}[,\]])/g;
@@ -47,12 +39,12 @@ async function handle(
} catch (e) {
console.log("[LOG]", e);
return NextResponse.json({ status: 0 });
return NextResponse.json({ status: e?.toString() }, { status: 400 });
}
return NextResponse.json({ status: 1 });
}
export const GET = handle;
// export const GET = handle;
export const POST = handle;
// export const runtime = "edge";