summaryrefslogtreecommitdiffstats
path: root/res/res/resources/health_check_views.py
diff options
context:
space:
mode:
Diffstat (limited to 'res/res/resources/health_check_views.py')
-rw-r--r--res/res/resources/health_check_views.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/res/res/resources/health_check_views.py b/res/res/resources/health_check_views.py
index 9df01f2..cc1a379 100644
--- a/res/res/resources/health_check_views.py
+++ b/res/res/resources/health_check_views.py
@@ -14,11 +14,18 @@
import logging
+from drf_yasg.utils import swagger_auto_schema
+from rest_framework import status
+from rest_framework.response import Response
from rest_framework.views import APIView
logger = logging.getLogger(__name__)
class HealthCheckView(APIView):
- logger.debug("Health check")
- pass
+ @swagger_auto_schema(
+ responses={
+ status.HTTP_200_OK: 'Active'})
+ def get(self, request, format=None):
+ logger.debug("Health check.")
+ return Response({"status": "active"})