From c34f1a4fed9d40e80d4088e130fc24c83b5d84f3 Mon Sep 17 00:00:00 2001 From: BryantHe Date: Sat, 26 Aug 2023 11:14:22 +0800 Subject: [PATCH] feat: add api of delete one 2 --- app/api/v1/record.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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'}