refactor(notifications): align app structure with backend conventions
This commit is contained in:
35
apps/notifications/api/urls.py
Normal file
35
apps/notifications/api/urls.py
Normal 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",
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user