diff --git a/app/api/v1/record.py b/app/api/v1/record.py index c902c68..ca815b8 100644 --- a/app/api/v1/record.py +++ b/app/api/v1/record.py @@ -41,11 +41,10 @@ def get_record(record_id): @record.delete('/') @record.doc(summary='删除单条身体记录', description='删除单条身体记录') -@record.input(BodyRecordIdIn, location='json') @login_required -def delete_record(json_data): +def delete_record(record_id): try: - rpc.body_record.delete_one(json_data['record_id']) + rpc.body_record.delete_one(record_id) except Exception as e: raise BodyRecordNotFound(extra_data={'error_docs': str(e)}) return {'msg': ' delete body record success'}