20 lines
574 B
Python
20 lines
574 B
Python
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
|
|
|
|
from apps.accounts.views import MeView
|
|
|
|
urlpatterns = [
|
|
path('admin/', admin.site.urls),
|
|
path('', include('apps.common.urls')),
|
|
|
|
# Login
|
|
path('api/auth/login/',TokenObtainPairView.as_view(), name='token_obtain_pair'),
|
|
|
|
# Refresh token
|
|
path('api/auth/refresh/',TokenRefreshView.as_view(), name='token_refresh'),
|
|
|
|
# Me
|
|
path('api/auth/me/', MeView.as_view(), name='me'),
|
|
]
|