|
@@ -44,7 +44,7 @@ class SummaryFile extends API {
|
|
|
|
|
|
try {
|
|
|
const time = new Date().getTime()
|
|
|
- filePath = path.join(r[0].path, filePath)
|
|
|
+ filePath = path.join(rows[0].path, filePath)
|
|
|
sql = 'INSERT INTO file_summary_tasks (repo_id, create_time, create_user, repo_hash, filepath) VALUES (?, ?, ?, ?, ?)'
|
|
|
let r = await db.query(sql, [id, time, uuid, hash, filePath])
|
|
|
|
|
@@ -62,6 +62,10 @@ class SummaryFile extends API {
|
|
|
await axios.post(endpoint, { uuid, repo_url: rows[0].url, task_id: String(r.insertId), file_path: filePath })
|
|
|
} catch (error) {
|
|
|
this.logger.error('添加AI分析任务失败!' + error.stack)
|
|
|
+ return res.json({
|
|
|
+ ...BaseStdResponse.ERR,
|
|
|
+ msg: '添加AI分析任务失败!'
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|