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
|
|
@ -45,7 +45,7 @@ func (r *FeedbackRepository) FindAll() ([]training.Feedback, error) {
|
|||
return feedbacks, nil
|
||||
}
|
||||
|
||||
func (r *FeedbackRepository) Save(f *training.Feedback) error {
|
||||
func (r *FeedbackRepository) Create(f *training.Feedback) error {
|
||||
_, err := r.db.Exec("INSERT INTO feedback (id, attendee_id, rating, comment, is_anonymous, is_sharing_allowed) VALUES ($1, $2, $3, $4, $5, $6)", f.ID, f.AttendeeID, f.Rating, f.Comment, f.IsAnonymous, f.IsSharingAllowed)
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue