Skip to content

Commit

Permalink
Use generic type for ScopeUnpaginated
Browse files Browse the repository at this point in the history
  • Loading branch information
System-Glitch committed Mar 25, 2024
1 parent 0655ce0 commit ee028ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (s *Settings[T]) Scope(db *gorm.DB, request *Request, dest *[]T) (*database
// Returns the `*gorm.DB` result, which can be used to check for database errors.
// The records will be added in the given `dest` slice.
// The given request is expected to be validated using `ApplyValidation`.
func (s *Settings[T]) ScopeUnpaginated(db *gorm.DB, request *Request, dest any) *gorm.DB {
func (s *Settings[T]) ScopeUnpaginated(db *gorm.DB, request *Request, dest *[]T) *gorm.DB {
db, schema, hasJoins := s.scopeCommon(db, request, dest)
db = s.scopeSort(db, request, schema)
if fieldsDB := s.scopeFields(db, request, schema, hasJoins); fieldsDB != nil {
Expand Down

0 comments on commit ee028ce

Please sign in to comment.