Fix total count in page response
All checks were successful
Integration Tests / test-integration (pull_request) Successful in 2m59s
Build / build (pull_request) Successful in 3m5s
E2E Tests / test-e2e (pull_request) Successful in 4m24s
Unit Tests / test-unit (pull_request) Successful in 2m31s
SDK Tests / sdk_tests_nameservice_expiry (pull_request) Successful in 8m18s
SDK Tests / sdk_tests (pull_request) Successful in 9m3s
SDK Tests / sdk_tests_auctions (pull_request) Successful in 14m43s

This commit is contained in:
Prathamesh Musale 2024-08-30 11:25:54 +05:30
parent d9edc38c7f
commit a0171776af

View File

@ -751,7 +751,7 @@ func paginate[T any](data []T, pagination *query.PageRequest) ([]T, *query.PageR
paginatedItems := data[start:end]
if countTotal {
return paginatedItems, &query.PageResponse{Total: end - start}
return paginatedItems, &query.PageResponse{Total: totalItems}
} else {
return paginatedItems, nil
}