Merge pull request #25 from StarFleetCPTN/development

refactor: Clean up config creation handler by removing debug print st…
This commit is contained in:
StarFleetCPTN
2025-03-14 23:24:13 -07:00
committed by GitHub
-6
View File
@@ -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))