Internal
Public Access
Add API root endpoint for /api/users/
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>
This commit is contained in:
co-authored by
Claude Sonnet 4.5
parent
d1720bebb3
commit
ab06bc4fc9
@@ -31,6 +31,25 @@ User = get_user_model()
|
||||
# API Views
|
||||
# =============================================================================
|
||||
|
||||
class UsersAPIRoot(APIView):
|
||||
"""API root for users endpoints."""
|
||||
permission_classes = [permissions.AllowAny]
|
||||
|
||||
def get(self, request):
|
||||
return Response({
|
||||
'endpoints': {
|
||||
'register': '/api/users/register/',
|
||||
'login': '/api/users/token/',
|
||||
'refresh_token': '/api/users/token/refresh/',
|
||||
'verify_email': '/api/users/verify-email/',
|
||||
'resend_verification': '/api/users/resend-verification/',
|
||||
'profile': '/api/users/profile/',
|
||||
'change_password': '/api/users/change-password/',
|
||||
'devices': '/api/users/devices/',
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
class RegisterAPIView(generics.CreateAPIView):
|
||||
"""API endpoint for user registration."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user