refactor: repository pattern: rename Save() to Create()
This commit is contained in:
parent
ab4226561b
commit
cb9cc47245
8 changed files with 8 additions and 8 deletions
|
|
@ -68,7 +68,7 @@ func (r *DateRepository) FindAllForTraining(id training.ID) ([]training.Date, er
|
|||
return dates, nil
|
||||
}
|
||||
|
||||
func (r *DateRepository) Save(d *training.Date) error {
|
||||
func (r *DateRepository) Create(d *training.Date) error {
|
||||
_, err := r.db.Exec("INSERT INTO date (id, date, training_id, start_time, days, price, is_online, location, address, capacity) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)", d.ID, d.Date, d.TrainingID, d.StartTime, d.Days, d.Price, d.IsOnline, d.Location, d.Address, d.Capacity)
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue