Skip to content

Commit

Permalink
Mock send forms
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaptoss committed Jul 18, 2024
1 parent ec976ca commit f8520e3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/config/forms.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,23 @@ func (c *config) Forms() *Forms {
panic(fmt.Errorf("failed to figure out withdrawal point price: %w", err))
}

db, err := sql.Open("mysql", cfg.URL)
if err != nil {
panic(fmt.Errorf("failed to connect to mysql: %w", err))
}
// db, err := sql.Open("mysql", cfg.URL)
// if err != nil {
// panic(fmt.Errorf("failed to connect to mysql: %w", err))
// }

return &Forms{
Cooldown: cfg.Cooldown,
Period: cfg.Period,
MinAbnormalPeriod: cfg.MinAbnormalPeriod,
MaxAbnormalPeriod: cfg.MaxAbnormalPeriod,
db: db,
db: nil,
}
}).(*Forms)
}

func (f *Forms) SendForms(forms ...data.Form) error {
return nil
if len(forms) == 0 {
return nil
}
Expand Down

0 comments on commit f8520e3

Please sign in to comment.