feat: add api of body record 4
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
6ece569ce0
commit
539deb18d2
|
@ -37,13 +37,12 @@ def get_record(record_id):
|
|||
|
||||
|
||||
@record.get('/list')
|
||||
@record.input(BodyRecordsIn, location='query')
|
||||
@record.output(BodyRecordsOut)
|
||||
@record.doc(summary='查询身体记录列表', description='查询身体记录列表')
|
||||
@login_required
|
||||
def get_records(query_data):
|
||||
def get_records():
|
||||
try:
|
||||
result = rpc.body_record.get_all_by_user(query_data['user_id'])
|
||||
result = rpc.body_record.get_all_by_user(session['user_id'])
|
||||
except Exception as e:
|
||||
raise BodyRecordNotFound()
|
||||
return result
|
||||
|
|
|
@ -17,9 +17,5 @@ class BodyRecordOut(Schema):
|
|||
update_time = fields.String(allow_none=True)
|
||||
|
||||
|
||||
class BodyRecordsIn(Schema):
|
||||
user_id = fields.String()
|
||||
|
||||
|
||||
class BodyRecordsOut(Schema):
|
||||
records = fields.Nested(BodyRecordOut)
|
Loading…
Reference in New Issue