优化Service
All checks were successful
Go CI / test-and-build (push) Successful in 11s

This commit is contained in:
2026-04-06 16:37:27 +08:00
parent 3aa8057648
commit a067e8d17c
3 changed files with 95 additions and 51 deletions

View File

@@ -122,13 +122,13 @@ func (c *LibraryController) Scan(w http.ResponseWriter, r *http.Request) {
c.scanMutex.Unlock()
}()
err := c.service.Scan(id)
report, err := c.service.Scan(id)
if err != nil {
log.Printf("Scan failed: %v", err)
log.Printf("Scan failed for library %d: %v", id, err)
return
}
log.Printf("Scan completed successfully for library %d", id)
log.Printf("Scan completed for library %d: %+v", id, report)
}()
jsonMsg(w, "Library scan started.")