* chore: improved pat permissions * fix: err message * fix: removed permission from backend * [WEB-4330] refactor: update API token endpoints to use user context instead of workspace slug - Changed URL patterns for API token endpoints to use "users/api-tokens/" instead of "workspaces/<str:slug>/api-tokens/". - Refactored ApiTokenEndpoint methods to remove workspace slug parameter and adjust database queries accordingly. - Added new test cases for API token creation, retrieval, deletion, and updates, including support for bot users and minimal data submissions. * fix: removed workspace slug from api-tokens * fix: refactor * chore: url.py code rabbit suggestion * fix: APITokenService moved to package --------- Co-authored-by: Dheeraj Kumar Ketireddy <dheeru0198@gmail.com> Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
22 lines
541 B
Python
22 lines
541 B
Python
from django.urls import path
|
|
from plane.app.views import ApiTokenEndpoint, ServiceApiTokenEndpoint
|
|
|
|
urlpatterns = [
|
|
# API Tokens
|
|
path(
|
|
"users/api-tokens/",
|
|
ApiTokenEndpoint.as_view(),
|
|
name="api-tokens",
|
|
),
|
|
path(
|
|
"users/api-tokens/<uuid:pk>/",
|
|
ApiTokenEndpoint.as_view(),
|
|
name="api-tokens-details",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/service-api-tokens/",
|
|
ServiceApiTokenEndpoint.as_view(),
|
|
name="service-api-tokens",
|
|
),
|
|
## End API Tokens
|
|
]
|