* chore: pages realtime * chore: empty binary response * chore: added a ypy package * feat: pages collaboration * chore: update fetching logic * chore: degrade ypy version * chore: replace useEffect fetch logic with useSWR * chore: move all the update logic to the page store * refactor: remove react-hook-form * chore: save description_html as well * chore: migrate old data logic * fix: added description_binary as field name * fix: code cleanup * refactor: create separate hook to handle page description * fix: build errors * chore: combine updates instead of using the whole document * chore: removed ypy package * chore: added conflict resolving logic to the client side * chore: add a save changes button * chore: add read-only validation * chore: remove saving state information * chore: added permission class * chore: removed the migration file * chore: corrected the model field * chore: rename pageStore to page * chore: update collaboration provider * chore: add try catch to handle error --------- Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
93 lines
2.4 KiB
Python
93 lines
2.4 KiB
Python
from django.urls import path
|
|
|
|
|
|
from plane.app.views import (
|
|
PageViewSet,
|
|
PageFavoriteViewSet,
|
|
PageLogEndpoint,
|
|
SubPagesEndpoint,
|
|
PagesDescriptionViewSet,
|
|
)
|
|
|
|
|
|
urlpatterns = [
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/",
|
|
PageViewSet.as_view(
|
|
{
|
|
"get": "list",
|
|
"post": "create",
|
|
}
|
|
),
|
|
name="project-pages",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/",
|
|
PageViewSet.as_view(
|
|
{
|
|
"get": "retrieve",
|
|
"patch": "partial_update",
|
|
"delete": "destroy",
|
|
}
|
|
),
|
|
name="project-pages",
|
|
),
|
|
# favorite pages
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/favorite-pages/<uuid:pk>/",
|
|
PageFavoriteViewSet.as_view(
|
|
{
|
|
"post": "create",
|
|
"delete": "destroy",
|
|
}
|
|
),
|
|
name="user-favorite-pages",
|
|
),
|
|
# archived pages
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/archive/",
|
|
PageViewSet.as_view(
|
|
{
|
|
"post": "archive",
|
|
"delete": "unarchive",
|
|
}
|
|
),
|
|
name="project-page-archive-unarchive",
|
|
),
|
|
# lock and unlock
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/lock/",
|
|
PageViewSet.as_view(
|
|
{
|
|
"post": "lock",
|
|
"delete": "unlock",
|
|
}
|
|
),
|
|
name="project-pages-lock-unlock",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/transactions/",
|
|
PageLogEndpoint.as_view(),
|
|
name="page-transactions",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/transactions/<uuid:transaction>/",
|
|
PageLogEndpoint.as_view(),
|
|
name="page-transactions",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/sub-pages/",
|
|
SubPagesEndpoint.as_view(),
|
|
name="sub-page",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/projects/<uuid:project_id>/pages/<uuid:pk>/description/",
|
|
PagesDescriptionViewSet.as_view(
|
|
{
|
|
"get": "retrieve",
|
|
"patch": "partial_update",
|
|
}
|
|
),
|
|
name="page-description",
|
|
),
|
|
]
|