forked from github/plane
67 lines
1.6 KiB
Python
67 lines
1.6 KiB
Python
from django.urls import path
|
|
|
|
|
|
from plane.app.views import (
|
|
NotificationViewSet,
|
|
UnreadNotificationEndpoint,
|
|
MarkAllReadNotificationViewSet,
|
|
)
|
|
|
|
|
|
urlpatterns = [
|
|
path(
|
|
"workspaces/<str:slug>/users/notifications/",
|
|
NotificationViewSet.as_view(
|
|
{
|
|
"get": "list",
|
|
}
|
|
),
|
|
name="notifications",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/users/notifications/<uuid:pk>/",
|
|
NotificationViewSet.as_view(
|
|
{
|
|
"get": "retrieve",
|
|
"patch": "partial_update",
|
|
"delete": "destroy",
|
|
}
|
|
),
|
|
name="notifications",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/users/notifications/<uuid:pk>/read/",
|
|
NotificationViewSet.as_view(
|
|
{
|
|
"post": "mark_read",
|
|
"delete": "mark_unread",
|
|
}
|
|
),
|
|
name="notifications",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/users/notifications/<uuid:pk>/archive/",
|
|
NotificationViewSet.as_view(
|
|
{
|
|
"post": "archive",
|
|
"delete": "unarchive",
|
|
}
|
|
),
|
|
name="notifications",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/users/notifications/unread/",
|
|
UnreadNotificationEndpoint.as_view(),
|
|
name="unread-notifications",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/users/notifications/mark-all-read/",
|
|
MarkAllReadNotificationViewSet.as_view(
|
|
{
|
|
"post": "create",
|
|
}
|
|
),
|
|
name="mark-all-read-notifications",
|
|
),
|
|
]
|