Corp/backend/api/urls.py
Игорь Надеин ec4d056f91 refactor: Move notifications API to api/v1/ for consistency
- Created api/v1/notifications/ module with views.py and urls.py
- Moved API endpoints from notifications/api_views.py to api/v1/notifications/views.py
- Moved URL routing from notifications/api_urls.py to api/v1/notifications/urls.py
- Updated api/urls.py to remove old routing
- Updated api/v1/urls.py to include new notifications API
- Marked old files as DEPRECATED (will be removed in 2 months)
- Added migration documentation

Benefits:
- Unified API structure (employees, documents, notifications all in api/v1/)
- Proper versioning for notifications API
- Easier to maintain and extend
- All API modules follow same pattern

Breaking changes: None (URL paths unchanged, backward compatible)
Migration guide: docs/completed/NOTIFICATIONS_API_MIGRATION.md
2026-01-09 15:13:36 +03:00

18 lines
487 B
Python

# backend\api\urls.py
from django.urls import include, path
from rest_framework_simplejwt.views import TokenRefreshView
from .auth.views import PhoneOrEmailTokenObtainPairView
app_name = "api"
urlpatterns = [
path("v1/", include(("api.v1.urls", "v1"), namespace="v1")),
path(
"auth/token/",
PhoneOrEmailTokenObtainPairView.as_view(),
name="token_obtain_pair",
),
path("auth/token/refresh/", TokenRefreshView.as_view(), name="token_refresh"),
]