fix midjouney to 100% error

This commit is contained in:
sijinhui 2024-04-09 16:56:50 +08:00
parent 9d306118b3
commit f80d19e305

View File

@ -88,11 +88,17 @@ async function handle(
statusText: res.statusText,
});
}
return res;
// console.log('[mj res]', await res.json())
return NextResponse.json(await res.json(), {
status: res.status,
statusText: res.statusText,
});
} catch (e) {
console.log("[mj error]", e);
} finally {
clearTimeout(timeoutId);
}
return NextResponse.json({ error: "未知错误" }, { status: 400 });
}
export const GET = handle;