Files
xingrin/backend/apps/scan/notifications/urls.py
2025-12-12 18:04:57 +08:00

30 lines
734 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
通知系统 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'),
# 测试通知
path('test/', views.notifications_test, name='test'),
]
# WebSocket 实时通知路由在 routing.py 中定义ws://host/ws/notifications/