Skip to content

Commit

Permalink
fix: other method
Browse files Browse the repository at this point in the history
  • Loading branch information
helloplhm-qwq committed Jan 24, 2024
1 parent 5b1f741 commit e0f9633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async def handle_request(request):
resp = await handler(request)
if (isinstance(resp, str)):
resp = Response(body = resp, content_type='text/plain', status = 200)
elif (isinstance(resp, dict)):
elif (isinstance(resp, (list, dict))):
resp = handleResult(resp)
elif (not isinstance(resp, Response)):
resp = Response(body = str(resp), content_type='text/plain', status = 200)
Expand Down Expand Up @@ -130,7 +130,7 @@ async def handle(request):
if (method in dir(modules)):
return handleResult(await getattr(modules, method)(source, songId, quality, query))
else:
return handleResult(await modules.other(source, songId, quality, query))
return handleResult(await modules.other(method, source, songId, quality, query))
except:
logger.error(traceback.format_exc())
return handleResult({'code': 4, 'msg': '内部服务器错误', 'data': None}, 500)
Expand Down

0 comments on commit e0f9633

Please sign in to comment.