diff options
Diffstat (limited to 'animism-align/cli/app/server')
| -rw-r--r-- | animism-align/cli/app/server/web.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/animism-align/cli/app/server/web.py b/animism-align/cli/app/server/web.py index 890bd35..58754a2 100644 --- a/animism-align/cli/app/server/web.py +++ b/animism-align/cli/app/server/web.py @@ -14,6 +14,7 @@ logging.getLogger().addHandler(logging.StreamHandler()) from flask import Flask, Blueprint, send_from_directory, request from app.sql.common import db, connection_url +from app.utils.auth_utils import setup_jwt from app.settings import app_cfg from app.controllers.annotation_controller import AnnotationView @@ -33,9 +34,12 @@ def create_app(script_info=None): app.config['SQLALCHEMY_DATABASE_URI'] = connection_url app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config['SERVER_NAME'] = app_cfg.SERVER_NAME + app.config['SECRET_KEY'] = app_cfg.TOKEN_SECRET + app.config['JWT_AUTH_URL_RULE'] = '/api/v1/auth/login' app.url_map.strict_slashes = False db.init_app(app) + setup_jwt(app) AnnotationView.register(app, route_prefix='/api/v1/') ParagraphView.register(app, route_prefix='/api/v1/') |
