pep8 it
This commit is contained in:
+4
-2
@@ -7,6 +7,7 @@ from api.validators import ValidationError
|
||||
db = SQLAlchemy()
|
||||
esales = Esales()
|
||||
|
||||
|
||||
def create_app(config_name='config'):
|
||||
app = Flask(__name__)
|
||||
app.config.from_object(config_name)
|
||||
@@ -17,7 +18,8 @@ def create_app(config_name='config'):
|
||||
# register errors handlers
|
||||
@app.errorhandler(404)
|
||||
def on_404(error):
|
||||
response = jsonify({'status': 404, 'message': 'The requested resource was not found'})
|
||||
response = jsonify(
|
||||
{'status': 404, 'message': 'The requested resource was not found'})
|
||||
response.status_code = 404
|
||||
return response
|
||||
|
||||
@@ -36,4 +38,4 @@ def create_app(config_name='config'):
|
||||
# authentication
|
||||
app.before_request(check_api_key)
|
||||
|
||||
return app
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user