refactor(notifications): align app structure with backend conventions

This commit is contained in:
2026-04-25 12:00:05 +03:30
parent 48bf4f5c19
commit 5f9d413a57
14 changed files with 35 additions and 10 deletions

View File

@@ -0,0 +1,35 @@
from django.urls import include, path
from rest_framework.routers import DefaultRouter
from apps.notifications.api import views
router = DefaultRouter()
router.register("box", views.NotificationListViewSet, basename="box")
app_name = "notification"
urlpatterns = [
path("", include(router.urls)),
path("list/", views.NotificationListView.as_view(), name="notifications"),
path("seen/", views.NotificationSeenView.as_view(), name="notifications-seen"),
path(
"stream-token/",
views.NotificationStreamTokenView.as_view(),
name="notifications-stream-token",
),
path(
"stream/",
views.NotificationStreamView.as_view(),
name="notifications-stream",
),
path(
"seen/all/",
views.NotificationMarkAllReadView.as_view(),
name="notifications-mark-read",
),
path(
"<str:notif_id>/",
views.NotificationDeleteView.as_view(),
name="notifications-delete",
),
]