We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52e25f7 commit 12a3112Copy full SHA for 12a3112
1 file changed
App(BE)/main/api/book.py
@@ -7,6 +7,10 @@
7
@book_page.route('/search/title=<title>&page=<page>',methods=['GET'])
8
def book_search(title, page):
9
page = int(page)
10
+ if page <= 1:
11
+ page = 0
12
+ else:
13
+ page = page - 1
14
ajson = []
15
a = list (database.client.API_test.book.find( {'title': { '$regex': '{}'.format(title) }} ).skip(page*5).limit(5))
16
for o in range(len(a)):
0 commit comments