diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-02-26 15:20:54 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-02-26 15:20:54 +0100 |
commit | c0d48f8a060fa30107183ad024e8c03cfee0eb26 (patch) | |
tree | e1aab8c092be0c2bd1e51d6ac09187096490652f /newspipe/web/views/api/v2/category.py | |
parent | Removed sendgrid dependency. (diff) | |
download | newspipe-c0d48f8a060fa30107183ad024e8c03cfee0eb26.tar.gz newspipe-c0d48f8a060fa30107183ad024e8c03cfee0eb26.tar.bz2 newspipe-c0d48f8a060fa30107183ad024e8c03cfee0eb26.zip |
added a little black magic
Diffstat (limited to 'newspipe/web/views/api/v2/category.py')
-rw-r--r-- | newspipe/web/views/api/v2/category.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/newspipe/web/views/api/v2/category.py b/newspipe/web/views/api/v2/category.py index 70fda1ea..a830624d 100644 --- a/newspipe/web/views/api/v2/category.py +++ b/newspipe/web/views/api/v2/category.py @@ -3,9 +3,11 @@ from flask import current_app from flask_restful import Api from web.controllers.category import CategoryController -from web.views.api.v2.common import (PyAggResourceNew, - PyAggResourceExisting, - PyAggResourceMulti) +from web.views.api.v2.common import ( + PyAggResourceNew, + PyAggResourceExisting, + PyAggResourceMulti, +) class CategoryNewAPI(PyAggResourceNew): @@ -21,7 +23,6 @@ class CategoriesAPI(PyAggResourceMulti): api = Api(current_app, prefix=API_ROOT) -api.add_resource(CategoryNewAPI, '/category', endpoint='category_new.json') -api.add_resource(CategoryAPI, '/category/<int:obj_id>', - endpoint='category.json') -api.add_resource(CategoriesAPI, '/categories', endpoint='categories.json') +api.add_resource(CategoryNewAPI, "/category", endpoint="category_new.json") +api.add_resource(CategoryAPI, "/category/<int:obj_id>", endpoint="category.json") +api.add_resource(CategoriesAPI, "/categories", endpoint="categories.json") |