Skip to content

Commit 12a3112

Browse files
authored
book page 수정
1 parent 52e25f7 commit 12a3112

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

App(BE)/main/api/book.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
@book_page.route('/search/title=<title>&page=<page>',methods=['GET'])
88
def book_search(title, page):
99
page = int(page)
10+
if page <= 1:
11+
page = 0
12+
else:
13+
page = page - 1
1014
ajson = []
1115
a = list (database.client.API_test.book.find( {'title': { '$regex': '{}'.format(title) }} ).skip(page*5).limit(5))
1216
for o in range(len(a)):

0 commit comments

Comments
 (0)