feat: fixing user levels
This commit is contained in:
parent
c34041a2a2
commit
2a53680126
|
|
@ -61,7 +61,11 @@ func (_i *userLevelsRepository) GetAll(req request.UserLevelsQueryRequest) (user
|
|||
req.Pagination.Count = count
|
||||
req.Pagination = paginator.Paging(req.Pagination)
|
||||
|
||||
err = query.Offset(req.Pagination.Offset).Limit(req.Pagination.Limit).Find(&userLevelss).Error
|
||||
if req.Pagination.Limit == 0 {
|
||||
query.Limit(req.Pagination.Limit)
|
||||
}
|
||||
|
||||
err = query.Offset(req.Pagination.Offset).Find(&userLevelss).Error
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue