Skip to content

Commit

Permalink
Merge pull request #3 from colin-combe/python3
Browse files Browse the repository at this point in the history
add orjson encode to xiview data endpoint
  • Loading branch information
sureshhewabi authored Feb 8, 2024
2 parents 47820f8 + 74f7101 commit 537668e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/routes/xiview.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async def get_xiview_data(project, file=None):
print(e)
return {"error": "Database error"}, 500

return data_object
return Response(orjson.dumps(data_object), media_type='application/json')


@xiview_data_router.get('/get_peaklist', tags=["xiVIEW"])
Expand Down Expand Up @@ -118,7 +118,7 @@ async def get_data_object(ids, pxid):
logger.debug('Database connection closed.')
if error is not None:
raise error
return Response(orjson.dumps(data), media_type='application/json')
return data


async def get_pride_api_info(cur, pxid):
Expand Down

0 comments on commit 537668e

Please sign in to comment.