fix: refs for db provider and few utils
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
// GetPagination helps getting pagination data from paginated input
|
||||
// also returns default limit and offset if pagination data is not present
|
||||
func GetPagination(paginatedInput *model.PaginatedInput) model.Pagination {
|
||||
func GetPagination(paginatedInput *model.PaginatedInput) *model.Pagination {
|
||||
limit := int64(constants.DefaultLimit)
|
||||
page := int64(1)
|
||||
|
||||
@@ -21,7 +21,7 @@ func GetPagination(paginatedInput *model.PaginatedInput) model.Pagination {
|
||||
}
|
||||
}
|
||||
|
||||
return model.Pagination{
|
||||
return &model.Pagination{
|
||||
Limit: limit,
|
||||
Offset: (page - 1) * limit,
|
||||
Page: page,
|
||||
|
Reference in New Issue
Block a user