fix: adjust api of get_records
continuous-integration/drone/push Build is passing Details

This commit is contained in:
BryantHe 2023-09-21 15:29:34 +08:00
parent c3cd257cbf
commit 063bf5c18b
2 changed files with 3 additions and 1 deletions

View File

@ -74,7 +74,7 @@ def get_records(query_data):
current_date=current_date) current_date=current_date)
except Exception as e: except Exception as e:
raise BodyRecordNotFound(extra_data={'error_docs': str(e)}) raise BodyRecordNotFound(extra_data={'error_docs': str(e)})
return {'records': results} return results
@record.get('/chart') @record.get('/chart')

View File

@ -32,6 +32,8 @@ class BodyRecordsIn(Schema):
class BodyRecordsOut(Schema): class BodyRecordsOut(Schema):
records = fields.List(fields.Nested(BodyRecordOut)) records = fields.List(fields.Nested(BodyRecordOut))
previous_date = fields.String()
next_date = fields.String()
class BodyRecordChartIn(Schema): class BodyRecordChartIn(Schema):