debug: 添加enhance API请求追踪日志
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2025-12-29 01:42:12 +08:00
parent 5e402948a2
commit b64cefccb5

View File

@ -155,9 +155,12 @@ async function pollTaskResult(
* 将处理后的图片上传到S3并保存到数据库
*/
export async function POST(request: NextRequest) {
console.log("[Enhance API] ===== 收到请求 =====");
try {
// 0. 获取用户会话
console.log("[Enhance API] 开始获取用户会话...");
const session = await auth();
console.log("[Enhance API] 用户会话获取完成:", session?.user?.id ? "已登录" : "未登录");
if (!session?.user?.id) {
return NextResponse.json(
{ error: "未授权,请先登录" },