From b38a9f56e54eb21eec37f40075399961ba82906f Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Fri, 9 Feb 2018 12:19:55 +0000 Subject: Move from straight app registration to Blueprints (#6) --- pysite/views/api/__init__.py | 1 + pysite/views/api/healthcheck.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 pysite/views/api/__init__.py create mode 100644 pysite/views/api/healthcheck.py (limited to 'pysite/views/api') diff --git a/pysite/views/api/__init__.py b/pysite/views/api/__init__.py new file mode 100644 index 00000000..9bad5790 --- /dev/null +++ b/pysite/views/api/__init__.py @@ -0,0 +1 @@ +# coding=utf-8 diff --git a/pysite/views/api/healthcheck.py b/pysite/views/api/healthcheck.py new file mode 100644 index 00000000..9d1f681a --- /dev/null +++ b/pysite/views/api/healthcheck.py @@ -0,0 +1,12 @@ +# coding=utf-8 +from flask import jsonify + +from pysite.base_route import RouteView + + +class IndexView(RouteView): + path = "/healthcheck" + name = "healthcheck" + + def get(self): + return jsonify({"status": "ok"}) -- cgit v1.2.3