Skip to content
Snippets Groups Projects
Verified Commit c8f577fb authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch 'master' of edugit.org:infrablue/python-bigbluebutton2 into master

parents 89f4999a 1937b6a1
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,6 @@ from django.urls import path
from .views import APIView
urlpatterns = [
path("api/<str:method>", APIView.as_view()),
path("api", APIView.as_view()),
path("api/<str:method>/", APIView.as_view()),
path("api/", APIView.as_view()),
]
......@@ -18,7 +18,7 @@ class APIView(View):
# Set to False to mimic the reference implementation more closely
_fix_status = True
def dispatch(self, request: HttpRequest, method: str = "ping") -> HttpResponse:
def dispatch(self, request: HttpRequest, method: str = "") -> HttpResponse:
# Find API tokens to allow for this request
site = get_current_site(request)
api_tokens = APIToken.objects.filter(server_group__site=site)
......@@ -47,7 +47,7 @@ class APIView(View):
raise TypeError("API token has unexpected scope")
# Proprietary extension for test purposes
if method == "ping":
if method in ("ping", ""):
return self._success(
"xInfraBluePong", "The API is working correctly and your request was valid.", {"version": "2.0"}
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment