P5-6517 add market resource (#32)
This commit is contained in:
+16
-1
@@ -25,8 +25,22 @@ def create_app(config_name="config"):
|
||||
response.status_code = 400
|
||||
return response
|
||||
|
||||
@app.errorhandler(ValueError)
|
||||
def on_validation_error(error):
|
||||
response = jsonify({"status": 400, "message": str(error)})
|
||||
response.status_code = 400
|
||||
return response
|
||||
|
||||
# register resources
|
||||
from api.resources import server, designers, categories, prices, orders, order_rows
|
||||
from api.resources import (
|
||||
server,
|
||||
designers,
|
||||
categories,
|
||||
prices,
|
||||
orders,
|
||||
order_rows,
|
||||
markets,
|
||||
)
|
||||
|
||||
app.register_blueprint(server.mod)
|
||||
app.register_blueprint(designers.mod)
|
||||
@@ -34,5 +48,6 @@ def create_app(config_name="config"):
|
||||
app.register_blueprint(prices.mod)
|
||||
app.register_blueprint(orders.mod)
|
||||
app.register_blueprint(order_rows.mod)
|
||||
app.register_blueprint(markets.mod)
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user