新增 AI 結果與資料庫整合
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user