fix: bug
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
BryantHe 2023-08-11 16:55:29 +08:00
parent 95ccf2865d
commit d4a5735d57
2 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,6 @@
# pzx-web-api
[![Build Status](https://drone.bearcatlog.com/api/badges/Bryant/pzx-web-api/status.svg)](https://drone.bearcatlog.com/Bryant/pzx-web-api)
pzx 专属的 web api 服务

View File

@ -9,9 +9,9 @@ auth = APIBlueprint('auth', __name__)
@auth.post('/wechat_login')
@auth.input(WechatLoginIn)
@auth.output(WechatLoginOut)
def wechat_login(data):
def wechat_login(json_data):
try:
result = rpc.admin.wechat_login(data['code'])
result = rpc.admin.wechat_login(json_data['code'])
except Exception as e:
raise e
return result
@ -20,6 +20,6 @@ def wechat_login(data):
@auth.get('/refresh_token')
@auth.input(RefreshTokenIn, location='query')
@auth.output(RefreshTokenOut)
def refresh_token(data):
result = rpc.admin.refresh_token(data['refresh_token'])
def refresh_token(query_data):
result = rpc.admin.refresh_token(query_data['refresh_token'])
return result