fix: refs for db provider and few utils

This commit is contained in:
Lakhan Samani
2023-07-31 16:42:11 +05:30
parent 146561bacb
commit 15a4be5431
82 changed files with 394 additions and 533 deletions

View File

@@ -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,