Skip to content
This repository has been archived by the owner on May 7, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1 from david4096/updates
Browse files Browse the repository at this point in the history
Fix next page token
  • Loading branch information
david4096 authored Feb 27, 2018
2 parents 0f8d524 + 5d218a5 commit 956f3ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def gdc_to_dos_list_response(gdcr):
#mres['data_objects'].append(gdc_to_ga4gh(req.json()))
mres['data_objects'].append(gdc_to_ga4gh(hit))
if len(gdcr.get('hits', [])) > 0:
mres['next_page_token'] = gdcr['pagination']['from'] + gdcr['pagination']['size']
mres['next_page_token'] = str(gdcr['pagination']['from'] + gdcr['pagination']['size'])
return mres


Expand Down Expand Up @@ -108,4 +108,4 @@ def index():
message = "<h1>Welcome to the DOS lambda, send requests to /ga4gh/dos/v1/</h1>"
return Response(body=message,
status_code=200,
headers={'Content-Type': 'text/html'})
headers={'Content-Type': 'text/html'})

0 comments on commit 956f3ae

Please sign in to comment.