mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-16 22:13:47 +08:00
fix log
This commit is contained in:
@@ -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";
|
||||
Reference in New Issue
Block a user