Internal
Public Access
Added UsersAPIRoot view that returns available user-related endpoints when accessing /api/users/ directly. All API endpoint groups now have discoverable root endpoints: - /api/ - Main API root - /api/users/ - User endpoints - /api/tasks/ - Task endpoints (already had TaskListCreateAPIView) - /api/sync/ - Sync endpoints (already had sync view) - /api/notifications/ - Notification endpoints (already had NotificationListAPIView) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
34 lines
1.7 KiB
Python
34 lines
1.7 KiB
Python
"""
|
|
User URLs for KeepItGoing.
|
|
"""
|
|
|
|
from django.urls import path
|
|
from rest_framework_simplejwt.views import TokenRefreshView
|
|
|
|
from . import views
|
|
|
|
# API URLs (to be included under /api/users/)
|
|
api_urlpatterns = [
|
|
path('', views.UsersAPIRoot.as_view(), name='api-users-root'),
|
|
path('register/', views.RegisterAPIView.as_view(), name='api-register'),
|
|
path('verify-email/', views.VerifyEmailAPIView.as_view(), name='api-verify-email'),
|
|
path('resend-verification/', views.ResendVerificationEmailAPIView.as_view(), name='api-resend-verification'),
|
|
path('profile/', views.UserProfileAPIView.as_view(), name='api-profile'),
|
|
path('change-password/', views.ChangePasswordAPIView.as_view(), name='api-change-password'),
|
|
path('devices/', views.DeviceTokenAPIView.as_view(), name='api-devices'),
|
|
path('devices/<uuid:pk>/', views.DeviceTokenDeleteAPIView.as_view(), name='api-device-delete'),
|
|
path('token/', views.TokenObtainPairView.as_view(), name='token-obtain-pair'),
|
|
path('token/refresh/', TokenRefreshView.as_view(), name='token-refresh'),
|
|
]
|
|
|
|
# Web URLs (to be included at root level)
|
|
web_urlpatterns = [
|
|
path('login/', views.LoginView.as_view(), name='login'),
|
|
path('logout/', views.LogoutView.as_view(), name='logout'),
|
|
path('register/', views.RegisterView.as_view(), name='register'),
|
|
path('verify-email/<uuid:token>/', views.VerifyEmailWebView.as_view(), name='verify-email'),
|
|
path('resend-verification/', views.ResendVerificationWebView.as_view(), name='resend-verification'),
|
|
path('profile/', views.ProfileView.as_view(), name='profile'),
|
|
path('change-password/', views.ChangePasswordWebView.as_view(), name='change-password'),
|
|
]
|