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.get('/list')
|
||||||
@record.input(BodyRecordsIn, location='query')
|
|
||||||
@record.output(BodyRecordsOut)
|
@record.output(BodyRecordsOut)
|
||||||
@record.doc(summary='查询身体记录列表', description='查询身体记录列表')
|
@record.doc(summary='查询身体记录列表', description='查询身体记录列表')
|
||||||
@login_required
|
@login_required
|
||||||
def get_records(query_data):
|
def get_records():
|
||||||
try:
|
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:
|
except Exception as e:
|
||||||
raise BodyRecordNotFound()
|
raise BodyRecordNotFound()
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -17,9 +17,5 @@ class BodyRecordOut(Schema):
|
||||||
update_time = fields.String(allow_none=True)
|
update_time = fields.String(allow_none=True)
|
||||||
|
|
||||||
|
|
||||||
class BodyRecordsIn(Schema):
|
|
||||||
user_id = fields.String()
|
|
||||||
|
|
||||||
|
|
||||||
class BodyRecordsOut(Schema):
|
class BodyRecordsOut(Schema):
|
||||||
records = fields.Nested(BodyRecordOut)
|
records = fields.Nested(BodyRecordOut)
|
Loading…
Reference in New Issue