aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views/api/category.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/views/api/category.py')
-rw-r--r--pyaggr3g470r/views/api/category.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/pyaggr3g470r/views/api/category.py b/pyaggr3g470r/views/api/category.py
deleted file mode 100644
index 31f46751..00000000
--- a/pyaggr3g470r/views/api/category.py
+++ /dev/null
@@ -1,31 +0,0 @@
-from flask import g
-
-from pyaggr3g470r.controllers.category import CategoryController
-from pyaggr3g470r.views.api.common import (PyAggResourceNew,
- PyAggResourceExisting,
- PyAggResourceMulti)
-
-
-CAT_ATTRS = {'name': {'type': str},
- 'user_id': {'type': int}}
-
-
-class CategoryNewAPI(PyAggResourceNew):
- controller_cls = CategoryController
- attrs = CAT_ATTRS
-
-
-class CategoryAPI(PyAggResourceExisting):
- controller_cls = CategoryController
- attrs = CAT_ATTRS
-
-
-class CategoriesAPI(PyAggResourceMulti):
- controller_cls = CategoryController
- attrs = CAT_ATTRS
-
-
-g.api.add_resource(CategoryNewAPI, '/category', endpoint='category_new.json')
-g.api.add_resource(CategoryAPI, '/category/<int:obj_id>',
- endpoint='category.json')
-g.api.add_resource(CategoriesAPI, '/categories', endpoint='categories.json')
bgstack15