From a954023800b27e897df595d971782d8367a63bf3 Mon Sep 17 00:00:00 2001 From: StarFleetCPTN Date: Fri, 14 Mar 2025 23:23:41 -0700 Subject: [PATCH] refactor: Clean up config creation handler by removing debug print statements - Remove unnecessary print statements for form data and configuration details in the HandleCreateConfig function. - Update handling of skipProcessedFiles to use a pointer for improved clarity and functionality. --- internal/web/handlers/config_handlers.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/internal/web/handlers/config_handlers.go b/internal/web/handlers/config_handlers.go index 6b8e59b..fb7ea8a 100644 --- a/internal/web/handlers/config_handlers.go +++ b/internal/web/handlers/config_handlers.go @@ -72,16 +72,10 @@ func (h *Handlers) HandleCreateConfig(c *gin.Context) { userID := c.GetUint("userID") config.CreatedBy = userID - // print entire form data - fmt.Println("Form data:", c.Request.Form) - // Process skipProcessedFiles value (now using pointer) skipProcessedValue := c.Request.FormValue("skip_processed_files") == "true" config.SkipProcessedFiles = &skipProcessedValue - fmt.Println("Skip processed files:", config.SkipProcessedFiles) - fmt.Println("Config:", config) - if err := h.DB.Create(&config).Error; err != nil { log.Printf("Error creating config: %v", err) c.String(http.StatusInternalServerError, fmt.Sprintf("Failed to create config: %v", err))