aboutsummaryrefslogtreecommitdiff
path: root/newspipe/web/views/api/v2/category.py
diff options
context:
space:
mode:
Diffstat (limited to 'newspipe/web/views/api/v2/category.py')
-rw-r--r--newspipe/web/views/api/v2/category.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/newspipe/web/views/api/v2/category.py b/newspipe/web/views/api/v2/category.py
index a830624d..5f7ef354 100644
--- a/newspipe/web/views/api/v2/category.py
+++ b/newspipe/web/views/api/v2/category.py
@@ -1,9 +1,9 @@
-from conf import API_ROOT
from flask import current_app
from flask_restful import Api
-from web.controllers.category import CategoryController
-from web.views.api.v2.common import (
+from newspipe.bootstrap import application
+from newspipe.controllers.category import CategoryController
+from newspipe.web.views.api.v2.common import (
PyAggResourceNew,
PyAggResourceExisting,
PyAggResourceMulti,
@@ -22,7 +22,7 @@ class CategoriesAPI(PyAggResourceMulti):
controller_cls = CategoryController
-api = Api(current_app, prefix=API_ROOT)
+api = Api(current_app, prefix=application.config['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")
bgstack15