diff --git a/apps/tools/urls.py b/apps/tools/urls.py index 51e1718cc..33a1f6ccb 100644 --- a/apps/tools/urls.py +++ b/apps/tools/urls.py @@ -7,9 +7,9 @@ urlpatterns = [ path('workspace//tool', views.ToolView.as_view()), path('workspace//tool/import', views.ToolView.Import.as_view()), path('workspace//tool/pylint', views.ToolView.Pylint.as_view()), + path('workspace//tool/debug', views.ToolView.Debug.as_view()), path('workspace//tool/', views.ToolView.Operate.as_view()), - path('workspace//tool//debug', views.ToolView.Debug.as_view()), - path('workspace//tool//edit_icon', views.ToolView.Debug.as_view()), + path('workspace//tool//edit_icon', views.ToolView.EditIcon.as_view()), path('workspace//tool//export', views.ToolView.Export.as_view()), path('workspace//tool//', views.ToolView.Page.as_view()), ] diff --git a/apps/tools/views/tool.py b/apps/tools/views/tool.py index 9fe3abb8a..52194cc4d 100644 --- a/apps/tools/views/tool.py +++ b/apps/tools/views/tool.py @@ -60,9 +60,9 @@ class ToolView(APIView): tags=[_('Tool')] # type: ignore ) @has_permissions(PermissionConstants.TOOL_DEBUG.get_workspace_permission()) - def post(self, request: Request, workspace_id: str, tool_id: str): + def post(self, request: Request, workspace_id: str): return result.success(ToolSerializer.Debug( - data={'tool_id': tool_id, 'workspace_id': workspace_id} + data={'workspace_id': workspace_id, 'user_id': request.user.id} ).debug(request.data)) class Operate(APIView):