Browse Source

🐞 fix: 修复了部分bug

Pchen. 4 months ago
parent
commit
2fc793fc01
2 changed files with 3 additions and 3 deletions
  1. 2 2
      apis/AI/ScanRepo.js
  2. 1 1
      apis/AI/SummaryFile.js

+ 2 - 2
apis/AI/ScanRepo.js

@@ -48,8 +48,8 @@ class ScanRepo extends API {
             const hash = await git.revparse(['HEAD'])
             const time = new Date().getTime()
 
-            sql = 'INSERT INTO scan_tasks (repo_id, create_time, create_user, repo_hash) VALUES (?, ?, ?, ?)'
-            let r = await db.query(sql, [id, time, uuid, hash])
+            sql = 'INSERT INTO scan_tasks (repo_id, create_time, create_user, repo_hash, source) VALUES (?, ?, ?, ?, ?)'
+            let r = await db.query(sql, [id, time, uuid, hash, 'hand'])
             if(!r || r.affectedRows !== 1)
                 return res.json({
                     ...BaseStdResponse.ERR,

+ 1 - 1
apis/AI/SummaryFile.js

@@ -61,7 +61,7 @@ class SummaryFile extends API {
                 })
 
             const time = new Date().getTime()
-            sql = 'INSERT INTO file_summary_tasks (repo_id, create_time, create_user, repo_hash, filepath, source) VALUES (?, ?, ?, ?, ?, ?)'
+            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, 'hand'])
 
             if (!r || r.affectedRows !== 1)