Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
evm-store
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanli
evm-store
Commits
f7dc08af
Commit
f7dc08af
authored
Jul 28, 2021
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix(): 修改两处配置
parent
8e48dbda
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
tools/build_out/manager.py
tools/build_out/manager.py
+1
-1
tools/resources/application/app.py
tools/resources/application/app.py
+11
-10
No files found.
tools/build_out/manager.py
View file @
f7dc08af
...
...
@@ -40,7 +40,7 @@ def run():
# app.logger.setLevel(app.config.get('LOG_LEVEL', logging.INFO))
http_server
=
HTTPServer
(
WSGIContainer
(
app
))
http_server
.
listen
(
int
(
port
),
address
=
host
,
xheaders
=
True
)
http_server
.
listen
(
int
(
port
),
address
=
host
)
IOLoop
.
instance
()
.
start
()
@
manager
.
command
...
...
tools/resources/application/app.py
View file @
f7dc08af
...
...
@@ -59,16 +59,17 @@ def _custom_abort(http_status_code, **kwargs):
"""
自定义abort 400响应数据格式
"""
if
http_status_code
==
400
:
message
=
kwargs
.
get
(
'msg'
)
if
isinstance
(
message
,
dict
):
param
,
info
=
list
(
message
.
items
())[
0
]
data
=
'{}:{}!'
.
format
(
param
,
info
)
return
abort
(
jsonify
(
response_result
(
ResponseCode
.
HTTP_INVAILD_REQUEST
,
data
=
data
)))
else
:
return
abort
(
jsonify
(
response_result
(
ResponseCode
.
HTTP_INVAILD_REQUEST
,
data
=
message
)))
# return { 'code': http_status_code, 'msg': kwargs.get('message') }
return
abort
(
http_status_code
)
logger
.
info
(
kwargs
)
# if http_status_code == 400:
# message = kwargs.get('msg')
# if isinstance(message, dict):
# param, info = list(message.items())[0]
# data = '{}:{}!'.format(param, info)
# return abort(jsonify(response_result(ResponseCode.HTTP_INVAILD_REQUEST, data=data)))
# else:
# return abort(jsonify(response_result(ResponseCode.HTTP_INVAILD_REQUEST, data=message)))
return
abort
(
jsonify
({
'code'
:
http_status_code
,
'msg'
:
kwargs
}))
# return abort(http_status_code)
def
_access_control
(
response
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment