Fix #877: Ensure API urls answer with and without a trailing slash

This commit is contained in:
Eliot Berriot 2019-07-02 14:31:47 +02:00
parent 98c6e10351
commit 53b826c81a
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
15 changed files with 75 additions and 32 deletions

View file

@ -1,11 +1,11 @@
from django.conf.urls import url
from django.views.decorators.csrf import csrf_exempt
from rest_framework import routers
from funkwhale_api.common import routers
from . import views
router = routers.SimpleRouter()
router = routers.OptionalSlashRouter()
router.register(r"apps", views.ApplicationViewSet, "apps")
router.register(r"grants", views.GrantViewSet, "grants")