This repository was archived by the owner on Jan 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -526,8 +526,7 @@ exports.getTopTrackMembers = {
526
526
dbConnectionMap = connection . dbConnectionMap ,
527
527
result = { } ,
528
528
error ,
529
- sqlParams = { } ,
530
- isNoPaging ;
529
+ sqlParams = { } ;
531
530
if ( ! dbConnectionMap ) {
532
531
helper . handleNoConnection ( api , connection , next ) ;
533
532
return ;
@@ -549,8 +548,7 @@ exports.getTopTrackMembers = {
549
548
}
550
549
if ( pageIndex === - 1 ) {
551
550
pageIndex = 1 ;
552
- pageSize = MAX_INT ; // No paging, show all.
553
- isNoPaging = true ;
551
+ pageSize = MAX_PAGE_SIZE ; // No paging, show max allowed.
554
552
}
555
553
// Retrieves total number of top members for the given track.
556
554
api . dataAccess . executeQuery ( 'get_top_members_' + trackType + '_count' , sqlParams , dbConnectionMap , cb ) ;
@@ -559,10 +557,9 @@ exports.getTopTrackMembers = {
559
557
cb ( new Error ( 'no rows returned from get_top_members_' + trackType + '_count' ) ) ;
560
558
return ;
561
559
}
562
- var total = rows [ 0 ] . count ;
563
- result . total = total ;
560
+ result . total = rows [ 0 ] . count ;
564
561
result . pageIndex = pageIndex ;
565
- result . pageSize = isNoPaging ? total : pageSize ;
562
+ result . pageSize = pageSize ;
566
563
result . data = [ ] ;
567
564
sqlParams . firstRowIndex = ( pageIndex - 1 ) * pageSize ;
568
565
sqlParams . pageSize = pageSize ;
You can’t perform that action at this time.
0 commit comments