Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: adding HealthCheck endpoint and moving docs url #886

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions connect/internals/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView


class HealthCheckView(APIView):
authentication_classes = []

def get(self, request):
return Response(status=status.HTTP_200_OK)
4 changes: 3 additions & 1 deletion connect/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

from connect.api.v1 import urls as rookly_api_v1_urls
from connect.api.grpc.project.handlers import grpc_handlers as grpc_project_handlers
from connect.internals.views import HealthCheckView
from connect.api.grpc.organization.handlers import (
grpc_handlers as grpc_organization_handlers,
)
Expand All @@ -44,7 +45,8 @@
)

urlpatterns = [
path("", schema_view.with_ui("redoc")),
path("", HealthCheckView.as_view()),
path("docs/", schema_view.with_ui("redoc")),
path("admin/", admin.site.urls),
path("v1/", include(rookly_api_v1_urls)),
path("v2/", include(api_v2_urls)),
Expand Down
Loading