chore: proper naming for urls

This commit is contained in:
NarayanBavisetti 2023-10-06 11:52:28 +05:30
parent a1139c6709
commit 766b7a0c7b
8 changed files with 62 additions and 27 deletions

View File

@ -1,6 +1,7 @@
from .analytic import urlpatterns as analytic_urls
from .asset import urlpatterns as asset_urls
from .authentication import urlpatterns as authentication_urls
from .configuration import urlpatterns as configuration_urls
from .cycle import urlpatterns as cycle_urls
from .estimate import urlpatterns as estimate_urls
from .gpt import urlpatterns as gpt_urls
@ -16,6 +17,7 @@ from .public_board import urlpatterns as public_board_urls
from .release_note import urlpatterns as release_note_urls
from .search import urlpatterns as search_urls
from .state import urlpatterns as state_urls
from .unsplash import urlpatterns as unsplash_urls
from .user import urlpatterns as user_urls
from .views import urlpatterns as view_urls
from .workspace import urlpatterns as workspace_urls
@ -25,6 +27,7 @@ urlpatterns = [
*analytic_urls,
*asset_urls,
*authentication_urls,
*configuration_urls,
*cycle_urls,
*estimate_urls,
*gpt_urls,
@ -40,6 +43,7 @@ urlpatterns = [
*release_note_urls,
*search_urls,
*state_urls,
*unsplash_urls,
*user_urls,
*view_urls,
*workspace_urls,

View File

@ -0,0 +1,12 @@
from django.urls import path
from plane.api.views import ConfigurationEndpoint
urlpatterns = [
path(
"configs/",
ConfigurationEndpoint.as_view(),
name="configuration",
),
]

View File

@ -41,7 +41,7 @@ urlpatterns = [
"post": "create",
}
),
name="project-cycle",
name="project-issue-cycle",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/cycles/<uuid:cycle_id>/cycle-issues/<uuid:pk>/",
@ -53,12 +53,12 @@ urlpatterns = [
"delete": "destroy",
}
),
name="project-cycle",
name="project-issue-cycle",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/cycles/date-check/",
CycleDateCheckEndpoint.as_view(),
name="project-cycle",
name="project-cycle-date",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/user-favorite-cycles/",

View File

@ -12,7 +12,7 @@ urlpatterns = [
path(
"workspaces/<str:slug>/importers/<str:service>/",
ServiceIssueImportSummaryEndpoint.as_view(),
name="importer",
name="importer-summary",
),
path(
"workspaces/<str:slug>/projects/importers/<str:service>/",
@ -32,6 +32,6 @@ urlpatterns = [
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/service/<str:service>/importers/<uuid:importer_id>/",
UpdateServiceImportStatusEndpoint.as_view(),
name="importer",
name="importer-status",
),
]

View File

@ -14,6 +14,7 @@ from plane.api.views import (
ProjectIdentifierEndpoint,
ProjectFavoritesViewSet,
LeaveProjectEndpoint,
ProjectPublicCoverImagesEndpoint
)
@ -48,12 +49,12 @@ urlpatterns = [
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/invite/",
InviteProjectEndpoint.as_view(),
name="project",
name="invite-project",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/members/",
ProjectMemberViewSet.as_view({"get": "list"}),
name="project",
name="project-member",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/members/<uuid:pk>/",
@ -64,12 +65,12 @@ urlpatterns = [
"delete": "destroy",
}
),
name="project",
name="project-member",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/project-members/",
ProjectMemberEndpoint.as_view(),
name="project",
name="project-member",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/members/add/",
@ -79,7 +80,7 @@ urlpatterns = [
path(
"workspaces/<str:slug>/projects/join/",
ProjectJoinEndpoint.as_view(),
name="project",
name="project-join",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/team-invite/",
@ -89,7 +90,7 @@ urlpatterns = [
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/invitations/",
ProjectMemberInvitationsViewset.as_view({"get": "list"}),
name="workspace",
name="project-member-invite",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/invitations/<uuid:pk>/",
@ -99,7 +100,7 @@ urlpatterns = [
"delete": "destroy",
}
),
name="project",
name="project-member-invite",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/project-views/",
@ -109,7 +110,7 @@ urlpatterns = [
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/project-members/me/",
ProjectMemberUserEndpoint.as_view(),
name="project-view",
name="project-member-view",
),
path(
"workspaces/<str:slug>/user-favorite-projects/",
@ -118,7 +119,7 @@ urlpatterns = [
"post": "create",
}
),
name="project",
name="project-favorite",
),
path(
"workspaces/<str:slug>/user-favorite-projects/<uuid:project_id>/",
@ -127,11 +128,16 @@ urlpatterns = [
"delete": "destroy",
}
),
name="project",
name="project-favorite",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/members/leave/",
LeaveProjectEndpoint.as_view(),
name="project",
name="leave-project",
),
path(
"project-covers/",
ProjectPublicCoverImagesEndpoint.as_view(),
name="project-covers",
),
]

View File

@ -0,0 +1,13 @@
from django.urls import path
from plane.api.views import UnsplashEndpoint
urlpatterns = [
path(
"unsplash/",
UnsplashEndpoint.as_view(),
name="unsplash",
),
]

View File

@ -70,7 +70,7 @@ urlpatterns = [
"get": "retrieve",
}
),
name="workspace",
name="user-workspace-invitation",
),
# user join workspace
# User Graphs
@ -99,6 +99,6 @@ urlpatterns = [
path(
"users/me/invitations/projects/",
UserProjectInvitationsViewset.as_view({"get": "list", "post": "create"}),
name="user-project-invitaions",
name="user-project-invitations",
),
]

View File

@ -53,12 +53,12 @@ urlpatterns = [
path(
"workspaces/<str:slug>/invite/",
InviteWorkspaceEndpoint.as_view(),
name="workspace",
name="invite-workspace",
),
path(
"workspaces/<str:slug>/invitations/",
WorkspaceInvitationsViewset.as_view({"get": "list"}),
name="workspace",
name="workspace-invitations",
),
path(
"workspaces/<str:slug>/invitations/<uuid:pk>/",
@ -68,12 +68,12 @@ urlpatterns = [
"get": "retrieve",
}
),
name="workspace",
name="workspace-invitations",
),
path(
"workspaces/<str:slug>/members/",
WorkSpaceMemberViewSet.as_view({"get": "list"}),
name="workspace",
name="workspace-member",
),
path(
"workspaces/<str:slug>/members/<uuid:pk>/",
@ -84,7 +84,7 @@ urlpatterns = [
"get": "retrieve",
}
),
name="workspace",
name="workspace-member",
),
path(
"workspaces/<str:slug>/workspace-members/",
@ -99,7 +99,7 @@ urlpatterns = [
"post": "create",
}
),
name="workspace",
name="workspace-team-members",
),
path(
"workspaces/<str:slug>/teams/<uuid:pk>/",
@ -111,7 +111,7 @@ urlpatterns = [
"get": "retrieve",
}
),
name="workspace",
name="workspace-team-members",
),
path(
"users/last-visited-workspace/",
@ -126,7 +126,7 @@ urlpatterns = [
path(
"workspaces/<str:slug>/workspace-views/",
WorkspaceMemberUserViewsEndpoint.as_view(),
name="workspace-member-details",
name="workspace-member-views-details",
),
path(
"workspaces/<str:slug>/workspace-themes/",
@ -177,6 +177,6 @@ urlpatterns = [
path(
"workspaces/<str:slug>/members/leave/",
LeaveWorkspaceEndpoint.as_view(),
name="workspace-labels",
name="leave-workspace-members",
),
]