File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ BOOKS_SHOWN = 6;
5
5
// Return a list of books from a json object. Return null if there aren't any book.
6
6
const listBooks = ( ) => {
7
7
$ . ajax ( {
8
- url : `/api/books/?ordering=qualification_avg&only_reviewed=1&limit=${ BOOKS_SHOWN } ` ,
8
+ url : `/api/books/?ordering=- qualification_avg&only_reviewed=1&limit=${ BOOKS_SHOWN } ` ,
9
9
type : "GET" ,
10
10
success : function ( data ) {
11
11
let books = data . results ;
@@ -112,7 +112,7 @@ seeMoreButton = document.getElementById('see-more-button');
112
112
113
113
seeMoreButton . addEventListener ( 'click' , ( ) => {
114
114
$ . ajax ( {
115
- url : `/api/books/?ordering=qualification_avg&only_reviewed=1&offset=${ offset } &limit=${ BOOKS_SHOWN } ` ,
115
+ url : `/api/books/?ordering=- qualification_avg&only_reviewed=1&offset=${ offset } &limit=${ BOOKS_SHOWN } ` ,
116
116
type : "GET" ,
117
117
success : function ( data ) {
118
118
offset += BOOKS_SHOWN ;
You can’t perform that action at this time.
0 commit comments