feat: add STRM tree dry-run preview

This commit is contained in:
ShukeBta
2026-07-02 21:15:11 +08:00
parent c07290619c
commit d11f784438
8 changed files with 113 additions and 14 deletions
+2
View File
@@ -118,6 +118,7 @@ type generateSTRMTreeReq struct {
BaseURL string `json:"base_url"`
Overwrite bool `json:"overwrite"`
Cleanup bool `json:"cleanup"`
DryRun bool `json:"dry_run"`
}
func generateSTRMHandler(svc *service.Container) gin.HandlerFunc {
@@ -189,6 +190,7 @@ func generateSTRMFromTreeHandler(svc *service.Container) gin.HandlerFunc {
BaseURL: baseURL,
Overwrite: req.Overwrite,
Cleanup: req.Cleanup,
DryRun: req.DryRun,
})
if err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})