refactor: 将文件移动改为独立接口,扫描完成后手动触发

This commit is contained in:
2025-07-29 21:18:35 +08:00
parent 59b0206cf1
commit 2e01f6c3c9
7 changed files with 193 additions and 35 deletions
+2 -1
View File
@@ -34,10 +34,11 @@ func NewRouter(st *store.Store) *gin.Engine {
apiGroup.POST("/media/stats", mc.Stats)
apiGroup.GET("/media/preview", mc.Preview)
// 扫描整理(开始 / 中止 / 查进度 / 实时进度)
// 扫描整理(开始 / 中止 / 移动 / 查进度 / 实时进度)
sc := NewScanController(service.NewScanService(st))
apiGroup.POST("/scan/start", sc.Start)
apiGroup.POST("/scan/cancel", sc.Cancel)
apiGroup.POST("/scan/move", sc.Move)
apiGroup.GET("/scan/status", sc.Status)
apiGroup.GET("/scan/ws", sc.Ws)