mirror of
https://github.com/MeoProject/lx-music-api-server.git
synced 2025-05-23 19:17:41 +08:00
fix: other method
This commit is contained in:
parent
5b1f741845
commit
e0f96333d0
4
main.py
4
main.py
@ -93,7 +93,7 @@ async def handle_before_request(app, handler):
|
||||
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)
|
||||
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user