Files
oxpanel25/app/api/urls.py
2025-03-20 10:32:04 +01:00

20 lines
515 B
Python

from django.urls import path, include
# Ajout du package manquant dans requirements.txt ou installez-le avec:
# pip install djangorestframework-simplejwt
from rest_framework_simplejwt.views import (
TokenObtainPairView,
TokenRefreshView,
)
from .routers import router
app_name = "api"
urlpatterns = [
path("", include(router.urls)),
path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
]