diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-26 10:00:19 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-26 10:00:19 +0200 |
commit | 2e2eee1cc691b91f475d33458a24315b2a313541 (patch) | |
tree | f189556e9555f6e36f39d51dadae8f4964008210 /src/web/views/api/v3/feed.py | |
parent | Merge branch 'new-api' of github.com:JARR/JARR into new-api (diff) | |
download | newspipe-2e2eee1cc691b91f475d33458a24315b2a313541.tar.gz newspipe-2e2eee1cc691b91f475d33458a24315b2a313541.tar.bz2 newspipe-2e2eee1cc691b91f475d33458a24315b2a313541.zip |
Improved the Web services processors.
Diffstat (limited to 'src/web/views/api/v3/feed.py')
-rw-r--r-- | src/web/views/api/v3/feed.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/web/views/api/v3/feed.py b/src/web/views/api/v3/feed.py index a97aa415..bf1d376f 100644 --- a/src/web/views/api/v3/feed.py +++ b/src/web/views/api/v3/feed.py @@ -6,14 +6,14 @@ from web.views.api.v3.common import AbstractProcessor from web.views.api.v3.common import url_prefix, auth_func class FeedProcessor(AbstractProcessor): + """Concrete processors for the Feed Web service. + """ + def get_single_preprocessor(self, instance_id=None, **kw): # Check if the user is authorized to modify the specified # instance of the model. - contr = FeedController(current_user.id) - feed = contr.get(id=instance_id) - if not self.is_authorized(current_user, feed): - raise ProcessingException(description='Not Authorized', code=401) - + feed = FeedController(current_user.id).get(id=instance_id) + self.is_authorized(current_user, feed) feed_processor = FeedProcessor() |