perf: 修改授权 API Name

pull/9170/head
Bai 2022-12-06 19:53:36 +08:00
parent 6233e2b3de
commit bf5da83008
2 changed files with 12 additions and 12 deletions

View File

@ -16,10 +16,10 @@ from .mixin import SelfOrPKUserMixin, RebuildTreeMixin
logger = get_logger(__name__)
__all__ = [
'UserGrantedNodesApi',
'UserGrantedNodesAsTreeApi',
'UserGrantedNodeChildrenApi',
'UserGrantedNodeChildrenAsTreeApi',
'UserPermedNodesApi',
'UserPermedNodesAsTreeApi',
'UserPermedNodeChildrenApi',
'UserPermedNodeChildrenAsTreeApi',
'BaseGrantedNodeAsTreeApi',
'UserGrantedNodesMixin',
]
@ -95,7 +95,7 @@ class UserGrantedNodesMixin:
# API
class UserGrantedNodeChildrenApi(
class UserPermedNodeChildrenApi(
SelfOrPKUserMixin,
UserGrantedNodeChildrenMixin,
BaseNodeChildrenApi
@ -104,7 +104,7 @@ class UserGrantedNodeChildrenApi(
pass
class UserGrantedNodeChildrenAsTreeApi(
class UserPermedNodeChildrenAsTreeApi(
SelfOrPKUserMixin,
RebuildTreeMixin,
UserGrantedNodeChildrenMixin,
@ -114,7 +114,7 @@ class UserGrantedNodeChildrenAsTreeApi(
pass
class UserGrantedNodesApi(
class UserPermedNodesApi(
SelfOrPKUserMixin,
UserGrantedNodesMixin,
BaseGrantedNodeApi
@ -123,7 +123,7 @@ class UserGrantedNodesApi(
pass
class UserGrantedNodesAsTreeApi(
class UserPermedNodesAsTreeApi(
SelfOrPKUserMixin,
RebuildTreeMixin,
UserGrantedNodesMixin,

View File

@ -14,13 +14,13 @@ user_permission_urlpatterns = [
name='user-ungroup-assets-as-tree'),
# nodes
path('<str:user>/nodes/', api.UserGrantedNodesApi.as_view(),
path('<str:user>/nodes/', api.UserPermedNodesApi.as_view(),
name='user-nodes'),
path('<str:user>/nodes/tree/', api.UserGrantedNodesAsTreeApi.as_view(),
path('<str:user>/nodes/tree/', api.UserPermedNodesAsTreeApi.as_view(),
name='user-nodes-as-tree'),
path('<str:user>/nodes/children/', api.UserGrantedNodeChildrenApi.as_view(),
path('<str:user>/nodes/children/', api.UserPermedNodeChildrenApi.as_view(),
name='user-nodes-children'),
path('<str:user>/nodes/children/tree/', api.UserGrantedNodeChildrenAsTreeApi.as_view(),
path('<str:user>/nodes/children/tree/', api.UserPermedNodeChildrenAsTreeApi.as_view(),
name='user-nodes-children-as-tree'),
# node-assets