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
|
|
@ -76,7 +76,7 @@ func (r *AttendeeRepository) CountForDate(dateID training.DateID) (int, error) {
|
|||
return count, nil
|
||||
}
|
||||
|
||||
func (r *AttendeeRepository) Save(a *training.Attendee) error {
|
||||
func (r *AttendeeRepository) Create(a *training.Attendee) error {
|
||||
_, err := r.db.Exec("INSERT INTO attendee (id, date_id, name, email, company, role, is_student, has_attended, has_paid) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)", a.ID, a.DateID, a.Name, a.Email, a.Company, a.Role, a.IsStudent, a.HasAttended, a.HasPaid)
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue