2021-10-22 12:06:16 +00:00
|
|
|
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
|
2021-05-31 09:20:38 +00:00
|
|
|
|
2021-06-08 03:11:27 +00:00
|
|
|
from notifications import api
|
2021-05-31 09:20:38 +00:00
|
|
|
|
|
|
|
app_name = 'notifications'
|
|
|
|
|
|
|
|
router = BulkRouter()
|
|
|
|
router.register('system-msg-subscription', api.SystemMsgSubscriptionViewSet, 'system-msg-subscription')
|
2021-08-24 06:20:54 +00:00
|
|
|
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')
|
2021-05-31 09:20:38 +00:00
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
path('backends/', api.BackendListView.as_view(), name='backends')
|
2023-02-01 08:43:43 +00:00
|
|
|
]
|
|
|
|
urlpatterns += router.urls
|
2021-10-22 12:06:16 +00:00
|
|
|
|
|
|
|
if settings.DEBUG:
|
|
|
|
urlpatterns += [
|
|
|
|
path('debug-msgs/', api.get_all_test_messages, name='debug-all-msgs')
|
|
|
|
]
|