loko/loko/notifications/urls.py

38 lines
2 KiB
Python

from django.urls import path
from . import views
app_name = 'notifications'
urlpatterns = [
# Inbox
path('', views.inbox, name='inbox'),
# Actions
path('mark-read/<int:pk>/', views.mark_read, name='mark_read'),
path('mark-all-read/', views.mark_all_read, name='mark_all_read'),
path('archive/<int:pk>/', views.archive_notification, name='archive'),
# Settings
path('settings/', views.notification_settings, name='settings'),
# Create (admin/manager only)
path('create/', views.create_notification, name='create'),
# Teams
path('teams/', views.team_list, name='team_list'),
path('teams/create/', views.team_create, name='team_create'),
path('teams/<int:pk>/edit/', views.team_edit, name='team_edit'),
path('teams/<int:pk>/delete/', views.team_delete, name='team_delete'),
# Discussions
path('discussions/', views.discussion_list, name='discussion_list'),
path('discussions/new/', views.discussion_create, name='discussion_create'),
path('discussions/<int:pk>/', views.discussion_detail, name='discussion_detail'),
path('discussions/<int:pk>/flag/', views.discussion_set_flag, name='discussion_set_flag'),
# API
path('api/unread-count/', views.api_unread_count, name='api_unread_count'),
path('api/recent/', views.api_recent, name='api_recent'),
path('api/mention-search/', views.api_mention_search, name='api_mention_search'),
# Web Push API
path('api/webpush/vapid-key/', views.api_webpush_vapid_key, name='api_webpush_vapid_key'),
path('api/webpush/subscribe/', views.api_webpush_subscribe, name='api_webpush_subscribe'),
path('api/webpush/unsubscribe/', views.api_webpush_unsubscribe, name='api_webpush_unsubscribe'),
path('api/webpush/test/', views.api_webpush_test, name='api_webpush_test'),
path('api/webpush/device/<int:pk>/delete/', views.api_webpush_delete_device, name='api_webpush_delete_device'),
path('service-worker.js', views.service_worker_js, name='service_worker_js'),
]