2019-03-25 16:02:51 +00:00
|
|
|
from django.conf.urls import url
|
|
|
|
from django.views.decorators.csrf import csrf_exempt
|
|
|
|
|
2019-07-02 12:31:47 +00:00
|
|
|
from funkwhale_api.common import routers
|
2019-03-25 16:02:51 +00:00
|
|
|
|
|
|
|
from . import views
|
|
|
|
|
2019-07-02 12:31:47 +00:00
|
|
|
router = routers.OptionalSlashRouter()
|
2019-03-25 16:02:51 +00:00
|
|
|
router.register(r"apps", views.ApplicationViewSet, "apps")
|
|
|
|
router.register(r"grants", views.GrantViewSet, "grants")
|
|
|
|
|
|
|
|
urlpatterns = router.urls + [
|
|
|
|
url("^authorize/$", csrf_exempt(views.AuthorizeView.as_view()), name="authorize"),
|
|
|
|
url("^token/$", views.TokenView.as_view(), name="token"),
|
|
|
|
url("^revoke/$", views.RevokeTokenView.as_view(), name="revoke"),
|
|
|
|
]
|