mirror of
https://github.com/MeoProject/lx-music-api-server.git
synced 2025-07-06 22:42:14 +08:00
feat: 将所有api请求更换为异步,提高速度
This commit is contained in:
@ -58,7 +58,7 @@ def sign(params, body = "", signkey = tools["signkey"]):
|
||||
async def signRequest(url, params, options, signkey = tools["signkey"]):
|
||||
params['signature'] = sign(params, options.get("body") if options.get("body") else (options.get("data") if options.get("data") else ""), signkey)
|
||||
url = url + "?" + buildRequestParams(params)
|
||||
return Httpx.request(url, options)
|
||||
return await Httpx.AsyncRequest(url, options)
|
||||
|
||||
def getKey(hash_):
|
||||
return utils.createMD5(hash_.lower() + tools.pidversec + tools.appid + tools.mid + tools.userid)
|
||||
|
Reference in New Issue
Block a user