新增 AI 結果與資料庫整合

This commit is contained in:
2025-09-23 20:36:53 +08:00
parent ec7d101e96
commit 46db696122
30 changed files with 2352 additions and 54 deletions

View File

@@ -111,8 +111,9 @@ export async function POST(request: NextRequest) {
};
console.log('💾 創建檔案記錄...');
await ProjectFileService.create(fileData);
console.log('✅ 檔案記錄創建成功');
const fileResult = await ProjectFileService.create(fileData);
const projectFileId = (fileResult as any).insertId;
console.log('✅ 檔案記錄創建成功ID:', projectFileId);
// 更新專案狀態為 completed檔案上傳完成
console.log('🔄 更新專案狀態為 completed...');
@@ -123,6 +124,7 @@ export async function POST(request: NextRequest) {
success: true,
data: {
projectId,
projectFileId,
fileName: file.name,
fileSize: file.size,
fileType: file.type