mirror of
https://github.com/yyhuni/xingrin.git
synced 2026-01-31 19:53:11 +08:00
- Remove test notification route from URL patterns - Delete notifications_test view function and associated logic - Clean up unused test endpoint that was used for development purposes - Simplify notification API surface by removing non-production code
27 lines
652 B
Python
27 lines
652 B
Python
"""
|
||
通知系统 URL 配置
|
||
"""
|
||
|
||
from django.urls import path
|
||
from . import views
|
||
from .views import (
|
||
NotificationCollectionView,
|
||
NotificationMarkAllAsReadView,
|
||
NotificationUnreadCountView,
|
||
)
|
||
|
||
app_name = 'notifications'
|
||
|
||
urlpatterns = [
|
||
# 通知列表
|
||
path('', NotificationCollectionView.as_view(), name='list'),
|
||
|
||
# 未读数量
|
||
path('unread-count/', NotificationUnreadCountView.as_view(), name='unread-count'),
|
||
|
||
# 标记全部已读
|
||
path('mark-all-as-read/', NotificationMarkAllAsReadView.as_view(), name='mark-all-as-read'),
|
||
]
|
||
|
||
# WebSocket 实时通知路由在 routing.py 中定义:ws://host/ws/notifications/
|