diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-19 13:25:02 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-19 13:25:02 +0200 |
commit | d78d0c0136531093ad66a093d6cc0695967fc043 (patch) | |
tree | bf1b8efe583186b7177208bfce43abea8f707780 /src/web/views/api/v3/article.py | |
parent | Check is the user is authenticated before checking if the user is authorized ... (diff) | |
download | newspipe-d78d0c0136531093ad66a093d6cc0695967fc043.tar.gz newspipe-d78d0c0136531093ad66a093d6cc0695967fc043.tar.bz2 newspipe-d78d0c0136531093ad66a093d6cc0695967fc043.zip |
Defined an url prefix for the new API.
Diffstat (limited to 'src/web/views/api/v3/article.py')
-rw-r--r-- | src/web/views/api/v3/article.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/web/views/api/v3/article.py b/src/web/views/api/v3/article.py index da75dc47..cc769597 100644 --- a/src/web/views/api/v3/article.py +++ b/src/web/views/api/v3/article.py @@ -1,9 +1,10 @@ from web import models from bootstrap import application, manager -from web.views.api.v3.common import auth_func, check_auth +from web.views.api.v3.common import url_prefix, auth_func, check_auth blueprint_article = manager.create_api_blueprint(models.Article, + url_prefix=url_prefix, methods=['GET', 'POST', 'PUT', 'DELETE'], preprocessors=dict(GET_SINGLE=[auth_func, check_auth])) application.register_blueprint(blueprint_article) |