diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-19 12:46:08 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-19 12:46:08 +0200 |
commit | f5e2a8a4227de1e49598843294b7a5e3d82e273f (patch) | |
tree | 46a6e19fe8f50fc8d9ab88f7113c3553c4cc0d89 /src/web/views/api/v3/article.py | |
parent | Fixed bad links to the logo. (diff) | |
download | newspipe-f5e2a8a4227de1e49598843294b7a5e3d82e273f.tar.gz newspipe-f5e2a8a4227de1e49598843294b7a5e3d82e273f.tar.bz2 newspipe-f5e2a8a4227de1e49598843294b7a5e3d82e273f.zip |
Test preprocessors with Flask-Restless.
Diffstat (limited to 'src/web/views/api/v3/article.py')
-rw-r--r-- | src/web/views/api/v3/article.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/web/views/api/v3/article.py b/src/web/views/api/v3/article.py new file mode 100644 index 00000000..2f276170 --- /dev/null +++ b/src/web/views/api/v3/article.py @@ -0,0 +1,9 @@ +from web import models +from bootstrap import application, manager +from web.views.api.v3.common import check_auth + + +blueprint_article = manager.create_api_blueprint(models.Article, + methods=['GET', 'POST', 'PUT', 'DELETE'], + preprocessors=dict(GET_SINGLE=[check_auth])) +application.register_blueprint(blueprint_article) |