Skip to content

Commit

Permalink
Update icpApi.py
Browse files Browse the repository at this point in the history
  • Loading branch information
HG-ha authored Sep 11, 2023
1 parent b3b2054 commit 1c38fd0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion icpApi.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,22 @@ async def geturl(request):

if request.method == "GET":
appname = request.query.get("search")
pageNum = request.query.get("pageNum")
pageSize = request.query.get("pageSize")
if request.method == "POST":
data = await request.json()
appname = data.get("search")
pageNum = data.get("pageNum")
pageSize = data.get("pageSize")

if not appname:
return wj({"code":101,"msg":"参数错误,请指定search参数"})

return wj(await appth.get(path)(appname))
return wj(await appth.get(path)(
appname,
pageNum if str(pageNum) else '',
pageSize if str(pageSize) else ''
))

if __name__ == '__main__':

Expand Down

0 comments on commit 1c38fd0

Please sign in to comment.