fix: add storage deletion with library cleanup and scan validation

- Delete storage config now properly removes related libraries and media
- Scanner validates storage config exists before starting cloud scan
- Prevents orphaned scans when storage is removed
- Added repository methods: DeleteByType, FindByID for storage config
- Remove unused storageHandler route to fix compilation
This commit is contained in:
ShukeBta
2026-06-11 12:48:32 +08:00
parent e99d70b017
commit 95794f7bbc
7 changed files with 82 additions and 23 deletions
+1 -2
View File
@@ -112,8 +112,7 @@ func registerAuthenticatedRoutes(api *gin.RouterGroup, cfg *config.Config, svc *
authed.DELETE("/files", middleware.AdminRequired(), deleteFileHandler(svc))
authed.POST("/files/transfer", middleware.AdminRequired(), transferFileHandler(svc))
// Disk usage breakdown.
authed.GET("/storage", middleware.AdminRequired(), storageHandler(svc))
// // Disk usage breakdown.
// DLNA discovery + cast.
authed.GET("/dlna/devices", dlnaListHandler(svc))