jumpserver/apps/notifications/urls/api_urls.py

23 lines
710 B
Python
Raw Normal View History

from django.conf import settings
2023-02-01 08:43:43 +00:00
from django.urls import path
from rest_framework_bulk.routes import BulkRouter
from notifications import api
app_name = 'notifications'
router = BulkRouter()
router.register('system-msg-subscription', api.SystemMsgSubscriptionViewSet, 'system-msg-subscription')
router.register('user-msg-subscription', api.UserMsgSubscriptionViewSet, 'user-msg-subscription')
2023-02-01 08:43:43 +00:00
router.register('site-messages', api.SiteMessageViewSet, 'site-message')
urlpatterns = [
path('backends/', api.BackendListView.as_view(), name='backends')
2023-02-01 08:43:43 +00:00
]
urlpatterns += router.urls
if settings.DEBUG:
urlpatterns += [
path('debug-msgs/', api.get_all_test_messages, name='debug-all-msgs')
]