package controllers import ( "net/http" "path/filepath" "strings" "fotbal-club/internal/services" "github.com/gin-gonic/gin" ) type RembgController struct{} func NewRembgController() *RembgController { return &RembgController{} } func (rc *RembgController) Status(c *gin.Context) { s := services.GetRembgStatus() c.JSON(http.StatusOK, s) } func (rc *RembgController) Start(c *gin.Context) { cacheDir := strings.TrimSpace(c.Query("cache_dir")) if cacheDir == "" { cacheDir = filepath.Join("cache", "prefetch") } started := services.StartFACRLogosBatch(cacheDir) s := services.GetRembgStatus() c.JSON(http.StatusOK, gin.H{"started": started, "status": s}) }