Files
webarchive/user/user_auth_system/user_management/urls.py
Raphael Rouiller aa54287126 Base
2024-07-08 14:06:52 +02:00

26 lines
1.3 KiB
Python

from django.urls import path
from .views import (
SourceListCreateView, SourceRetrieveUpdateDestroyView,
TagListCreateView, SuggestionListCreateView, SuggestionApproveView,
UserRegistrationView, UserLoginView, UserLogoutView,
Enable2FAView, Verify2FAView, UserProfileView
)
from rest_framework_simplejwt.views import TokenRefreshView
urlpatterns = [
path('sources/', SourceListCreateView.as_view(), name='source-list-create'),
path('sources/<int:pk>/', SourceRetrieveUpdateDestroyView.as_view(), name='source-detail'),
path('tags/', TagListCreateView.as_view(), name='tag-list-create'),
path('suggestions/', SuggestionListCreateView.as_view(), name='suggestion-list-create'),
path('suggestions/<int:pk>/approve/', SuggestionApproveView.as_view(), name='suggestion-approve'),
path('users/register/', UserRegistrationView.as_view(), name='user-register'),
path('users/login/', UserLoginView.as_view(), name='user-login'),
path('users/logout/', UserLogoutView.as_view(), name='user-logout'),
path('users/profile/', UserProfileView.as_view(), name='user-profile'),
path('users/enable-2fa/', Enable2FAView.as_view(), name='enable-2fa'),
path('users/verify-2fa/', Verify2FAView.as_view(), name='verify-2fa'),
path('token/refresh/', TokenRefreshView.as_view(), name='token-refresh'),
]