feat: fixing user levels
This commit is contained in:
parent
21a5970dd8
commit
940773ae35
|
|
@ -61,7 +61,11 @@ func (_i *userLevelsRepository) GetAll(req request.UserLevelsQueryRequest) (user
|
||||||
req.Pagination.Count = count
|
req.Pagination.Count = count
|
||||||
req.Pagination = paginator.Paging(req.Pagination)
|
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 {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue