aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/views/api/index.py
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-02-09 12:51:58 +0000
committerGravatar Gareth Coles <[email protected]>2018-02-09 12:51:58 +0000
commitf18a4dede529d3bf2ed524d2e0efcdb9e8419d58 (patch)
treea51530fa54bbf15f2559659db8469669dbfb3ad2 /pysite/views/api/index.py
parentMove from straight app registration to Blueprints (#6) (diff)
Base API route and error codes enum
Diffstat (limited to 'pysite/views/api/index.py')
-rw-r--r--pysite/views/api/index.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pysite/views/api/index.py b/pysite/views/api/index.py
new file mode 100644
index 00000000..61fbece9
--- /dev/null
+++ b/pysite/views/api/index.py
@@ -0,0 +1,11 @@
+# coding=utf-8
+from pysite.base_route import APIView
+from pysite.constants import ErrorCodes
+
+
+class IndexView(APIView):
+ path = "/"
+ name = "index"
+
+ def get(self):
+ return self.error(ErrorCodes.unknown_route)