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

This commit is contained in:
BryantHe 2023-09-21 15:34:54 +08:00
parent 063bf5c18b
commit 18213b3958
2 changed files with 4 additions and 2 deletions

View File

@ -24,7 +24,7 @@ def get_diet_records(query_data):
current_date=current_date) current_date=current_date)
except Exception as e: except Exception as e:
raise DietRecordNotFound(extra_data={'error_docs': str(e)}) raise DietRecordNotFound(extra_data={'error_docs': str(e)})
return {'records': results} return results
@diet.get('/<diet_id>') @diet.get('/<diet_id>')

View File

@ -35,3 +35,5 @@ class DietRecordOut(Schema):
class DietRecordsOut(Schema): class DietRecordsOut(Schema):
records = fields.List(fields.Nested(DietRecordOut)) records = fields.List(fields.Nested(DietRecordOut))
previous_date = fields.String()
next_date = fields.String()