feat: add api of delete one 2
continuous-integration/drone/push Build is passing Details

This commit is contained in:
BryantHe 2023-08-26 11:14:22 +08:00
parent b86ef1376e
commit c34f1a4fed
1 changed files with 2 additions and 3 deletions

View File

@ -41,11 +41,10 @@ def get_record(record_id):
@record.delete('/<record_id>')
@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'}