Skip to content

Commit

Permalink
update query to interface
Browse files Browse the repository at this point in the history
  • Loading branch information
ochom committed Jan 29, 2024
1 parent e7c4f00 commit ed36005
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func FindAll[T any](query *T) ([]*T, error) {
// QueryAll ...
func QueryAll[T any](query interface{}) ([]*T, error) {
data := []*T{}
err := conn.First(&data, query).Error
err := conn.Find(&data, query).Error
return data, err
}

Expand Down

0 comments on commit ed36005

Please sign in to comment.