diff --git a/bigbluebutton/django/urls.py b/bigbluebutton/django/urls.py index e9c6acde99673a6709a3b1c8f4572c62a525ac64..688400590041fe62f42f915f0aa3a56f77f74e92 100644 --- a/bigbluebutton/django/urls.py +++ b/bigbluebutton/django/urls.py @@ -3,5 +3,6 @@ from django.urls import path from .views import APIView urlpatterns = [ - path("api/<str:method>", APIView.as_view(), name="api_request"), + path("api/<str:method>", APIView.as_view()), + path("api", APIView.as_view()), ] diff --git a/bigbluebutton/django/views.py b/bigbluebutton/django/views.py index 81ca9b38726fc33f724e4fe9f4a3b10b325b616a..72fc70ef852ca5d5d047e12390888e6d57516fa7 100644 --- a/bigbluebutton/django/views.py +++ b/bigbluebutton/django/views.py @@ -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) -> HttpResponse: + def dispatch(self, request: HttpRequest, method: str = "ping") -> HttpResponse: # Find API tokens to allow for this request site = get_current_site(request) api_tokens = APIToken.objects.filter(server_group__site=site) @@ -49,7 +49,7 @@ class APIView(View): # Proprietary extension for test purposes if method == "ping": return self._success( - "xInfraBluePong", "The API is working correctly and your request was valid." + "xInfraBluePong", "The API is working correctly and your request was valid.", {"version": "2.0"} ) # Create mutable copy of request args without checksum