feat: add api of body record 3
continuous-integration/drone/push Build is passing Details

This commit is contained in:
BryantHe 2023-08-12 20:23:19 +08:00
parent 95621cf3fe
commit 6ece569ce0
2 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,7 @@ auth = APIBlueprint('auth', __name__)
@auth.post('/wechat_login')
@auth.input(WechatLoginIn)
@auth.output(WechatLoginOut)
@auth.doc(summary='微信登录', description='微信登录', tags=['认证'])
@auth.doc(summary='微信登录', description='微信登录')
def wechat_login(json_data):
try:
result = rpc.admin.wechat_login(json_data['code'])
@ -22,7 +22,7 @@ def wechat_login(json_data):
@auth.get('/refresh_token')
@auth.input(RefreshTokenIn, location='query')
@auth.output(RefreshTokenOut)
@auth.doc(summary='刷新 Token', description='刷新 Token', tags=['认证'])
@auth.doc(summary='刷新 Token', description='刷新 Token')
def refresh_token(query_data):
try:
result = rpc.admin.refresh_token(query_data['refresh_token'])

View File

@ -11,7 +11,7 @@ record = APIBlueprint('record', __name__)
@record.post('/')
@record.input(BodyRecordIn)
@record.doc(summary='添加身体记录', description='添加身体记录', tags=['身体记录'])
@record.doc(summary='添加身体记录', description='添加身体记录')
@login_required
def add_record(json_data):
try:
@ -26,7 +26,7 @@ def add_record(json_data):
@record.get('/<record_id>')
@record.output(BodyRecordOut)
@record.doc(summary='查询单条身体记录', description='查询单条身体记录', tags=['身体记录'])
@record.doc(summary='查询单条身体记录', description='查询单条身体记录')
@login_required
def get_record(record_id):
try:
@ -39,7 +39,7 @@ def get_record(record_id):
@record.get('/list')
@record.input(BodyRecordsIn, location='query')
@record.output(BodyRecordsOut)
@record.doc(summary='查询身体记录列表', description='查询身体记录列表', tags=['身体记录'])
@record.doc(summary='查询身体记录列表', description='查询身体记录列表')
@login_required
def get_records(query_data):
try: