Skip to content
Snippets Groups Projects
Commit 35445ea0 authored by damb's avatar damb
Browse files

[ENH] Use path prefix

parent a451b6cc
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,9 @@ def create_app(config_dict={}):
from hydws.server.v1 import blueprint as api_v1_bp, API_VERSION_V1
app.register_blueprint(
api_v1_bp,
url_prefix='/v{version}'.format(version=API_VERSION_V1))
url_prefix='{prefix}/v{version}'.format(
prefix=settings.HYDWS_PATH_BASE,
version=API_VERSION_V1))
@app.before_request
def before_request():
......
......@@ -10,6 +10,7 @@ HYDWS_DEFAULT_SERVER_PORT = 5000
# ----------------------------------------------------------------------------
# service specific configuration parameters
HYDWS_PATH_BASE = '/hydws'
HYDWS_PATH_BOREHOLES = '/boreholes'
HYDWS_PATH_SECTIONS = '/sections'
HYDWS_PATH_HYDRAULICS='/hydraulics'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment