fixed response body Restore actions

pull/61/MERGE
13621160019@163.com 2021-08-14 17:24:35 +08:00
parent b5cde605d7
commit 06b2892e84
3 changed files with 3 additions and 6 deletions

View File

@ -272,5 +272,4 @@ class CostFileRestore:
except Exception as ex: except Exception as ex:
raise falcon.HTTPError(falcon.HTTP_400, title='API.ERROR', raise falcon.HTTPError(falcon.HTTP_400, title='API.ERROR',
description='API.FAILED_TO_RESTORE_COST_FILE') description='API.FAILED_TO_RESTORE_COST_FILE')
resp.body = 'success' resp.body = json.dumps('success')
resp.status = falcon.HTTP_200

View File

@ -319,6 +319,5 @@ class KnowledgeFileRestore:
except Exception as ex: except Exception as ex:
raise falcon.HTTPError(falcon.HTTP_400, title='API.ERROR', raise falcon.HTTPError(falcon.HTTP_400, title='API.ERROR',
description='API.FAILED_TO_RESTORE_KNOWLEDGE_FILE') description='API.FAILED_TO_RESTORE_KNOWLEDGE_FILE')
resp.body = 'success' resp.body = json.dumps('success')
resp.status = falcon.HTTP_200

View File

@ -272,5 +272,4 @@ class OfflineMeterFileRestore:
except Exception as ex: except Exception as ex:
raise falcon.HTTPError(falcon.HTTP_400, title='API.ERROR', raise falcon.HTTPError(falcon.HTTP_400, title='API.ERROR',
description='API.FAILED_TO_RESTORE_OFFLINE_METER_FILE') description='API.FAILED_TO_RESTORE_OFFLINE_METER_FILE')
resp.body = 'success' resp.body = json.dumps('success')
resp.status = falcon.HTTP_200