Commit a841cc68 authored by wanli's avatar wanli

update

parent 878a236a
...@@ -63,9 +63,9 @@ def _custom_abort(http_status_code, **kwargs): ...@@ -63,9 +63,9 @@ def _custom_abort(http_status_code, **kwargs):
if isinstance(message, dict): if isinstance(message, dict):
param, info = list(message.items())[0] param, info = list(message.items())[0]
data = '{}:{}!'.format(param, info) data = '{}:{}!'.format(param, info)
return abort(jsonify(response_result(ResponseCode.PARAMETER_ERRORRROR, data=data))) return abort(jsonify(response_result(ResponseCode.PARAMETER_ERROR, data=data)))
else: else:
return abort(jsonify(response_result(ResponseCode.PARAMETER_ERRORRROR, data=message))) return abort(jsonify(response_result(ResponseCode.PARAMETER_ERROR, data=message)))
# return { 'code': http_status_code, 'msg': kwargs.get('message') } # return { 'code': http_status_code, 'msg': kwargs.get('message') }
return abort(http_status_code) return abort(http_status_code)
......
...@@ -529,3 +529,18 @@ ...@@ -529,3 +529,18 @@
[2021-06-11 22:08:46,533][ INFO] [ _internal.py _log 225] 127.0.0.1 - - [11/Jun/2021 22:08:46] "GET /api/v1/area?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 - [2021-06-11 22:08:46,533][ INFO] [ _internal.py _log 225] 127.0.0.1 - - [11/Jun/2021 22:08:46] "GET /api/v1/area?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
[2021-06-11 22:11:37,620][ INFO] [ _internal.py _log 225] * Detected change in 'D:\\projects\\scriptiot\\evm-store\\tools\\build_out\\views\\area.py', reloading [2021-06-11 22:11:37,620][ INFO] [ _internal.py _log 225] * Detected change in 'D:\\projects\\scriptiot\\evm-store\\tools\\build_out\\views\\area.py', reloading
[2021-06-11 22:11:37,761][ INFO] [ _internal.py _log 225] * Restarting with stat [2021-06-11 22:11:37,761][ INFO] [ _internal.py _log 225] * Restarting with stat
[2021-06-11 22:11:39,336][WARNING] [ _internal.py _log 225] * Debugger is active!
[2021-06-11 22:11:39,392][ INFO] [ _internal.py _log 225] * Debugger PIN: 182-666-074
[2021-06-11 22:11:39,718][ INFO] [ _internal.py _log 225] * Running on http://127.0.0.1:3000/ (Press CTRL+C to quit)
[2021-06-11 22:11:47,633][ ERROR] [ area.py get 69] {'id': ['Unknown field.']}
[2021-06-11 22:11:47,634][ INFO] [ _internal.py _log 225] 127.0.0.1 - - [11/Jun/2021 22:11:47] "GET /api/v1/area HTTP/1.1" 200 -
[2021-06-11 22:11:50,734][ ERROR] [ area.py get 69] {'id': ['Unknown field.']}
[2021-06-11 22:11:50,735][ INFO] [ _internal.py _log 225] 127.0.0.1 - - [11/Jun/2021 22:11:50] "GET /api/v1/area HTTP/1.1" 200 -
[2021-06-11 22:11:51,832][ ERROR] [ area.py get 69] {'id': ['Unknown field.']}
[2021-06-11 22:11:51,833][ INFO] [ _internal.py _log 225] 127.0.0.1 - - [11/Jun/2021 22:11:51] "GET /api/v1/area HTTP/1.1" 200 -
[2021-06-11 22:11:52,989][ ERROR] [ area.py get 69] {'id': ['Unknown field.']}
[2021-06-11 22:11:52,991][ INFO] [ _internal.py _log 225] 127.0.0.1 - - [11/Jun/2021 22:11:52] "GET /api/v1/area HTTP/1.1" 200 -
[2021-06-11 22:11:53,810][ ERROR] [ area.py get 69] {'id': ['Unknown field.']}
[2021-06-11 22:11:53,811][ INFO] [ _internal.py _log 225] 127.0.0.1 - - [11/Jun/2021 22:11:53] "GET /api/v1/area HTTP/1.1" 200 -
[2021-06-11 22:11:54,441][ ERROR] [ area.py get 69] {'id': ['Unknown field.']}
[2021-06-11 22:11:54,442][ INFO] [ _internal.py _log 225] 127.0.0.1 - - [11/Jun/2021 22:11:54] "GET /api/v1/area HTTP/1.1" 200 -
...@@ -51,7 +51,7 @@ class AreaResourceList(Resource): ...@@ -51,7 +51,7 @@ class AreaResourceList(Resource):
# self.parser = RequestParser() # self.parser = RequestParser()
# @jwt_required @jwt_required
def get(self): def get(self):
# 特殊参数,即不是从json获取参数的接口,可以将这个注释打开 # 特殊参数,即不是从json获取参数的接口,可以将这个注释打开
# self.parser.add_argument("page", type=int, location="args", default=1) # self.parser.add_argument("page", type=int, location="args", default=1)
......
...@@ -63,9 +63,9 @@ def _custom_abort(http_status_code, **kwargs): ...@@ -63,9 +63,9 @@ def _custom_abort(http_status_code, **kwargs):
if isinstance(message, dict): if isinstance(message, dict):
param, info = list(message.items())[0] param, info = list(message.items())[0]
data = '{}:{}!'.format(param, info) data = '{}:{}!'.format(param, info)
return abort(jsonify(response_result(ResponseCode.PARAMETER_ERRORRROR, data=data))) return abort(jsonify(response_result(ResponseCode.PARAMETER_ERROR, data=data)))
else: else:
return abort(jsonify(response_result(ResponseCode.PARAMETER_ERRORRROR, data=message))) return abort(jsonify(response_result(ResponseCode.PARAMETER_ERROR, data=message)))
# return { 'code': http_status_code, 'msg': kwargs.get('message') } # return { 'code': http_status_code, 'msg': kwargs.get('message') }
return abort(http_status_code) return abort(http_status_code)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment