1
0
Fork 0

refactor: repository pattern: rename Save() to Create()

This commit is contained in:
Vojtěch Mareš 2024-04-30 21:37:59 +02:00
parent ab4226561b
commit cb9cc47245
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
8 changed files with 8 additions and 8 deletions

View file

@ -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
}