From 8811511ff83a23741e730a36356f691c4bb2a07a Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 7 May 2026 13:22:43 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=88=A0=E9=99=A4=E6=9C=AA?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E7=9A=84=20call-function=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 该功能与 dynamic-code/:key/execute 重复 - 保持代码整洁,移除无用代码 --- backend/internal/router/app/cloud.go | 29 ---------------------------- 1 file changed, 29 deletions(-) diff --git a/backend/internal/router/app/cloud.go b/backend/internal/router/app/cloud.go index c216bd9..7c14bfd 100644 --- a/backend/internal/router/app/cloud.go +++ b/backend/internal/router/app/cloud.go @@ -33,7 +33,6 @@ func SetupCloudRoutes(r *gin.RouterGroup) { r.POST("/variables/:key/records", handleAppCreateVariableRecord) r.GET("/variables/:key/records", handleAppGetVariableRecords) r.DELETE("/variables/:key/records/:record_id", handleAppDeleteVariableRecord) - r.POST("/call-function", handleAppCallFunction) } func handleAppGetConstants(c *gin.Context) { @@ -674,34 +673,6 @@ func handleAppUploadVariableBinary(c *gin.Context) { }) } -func handleAppCallFunction(c *gin.Context) { - appKey := c.Param("appKey") - var app model.Application - if err := database.DB.Where("app_key = ?", appKey).First(&app).Error; err != nil { - response.Error(c, 404, "应用不存在") - return - } - - if service.GetApplicationDisabledStatus(app.ID) { - response.Error(c, 403, "该应用已被禁用") - return - } - - var req struct { - UserID uint `json:"user_id"` - Name string `json:"name"` - Params map[string]interface{} `json:"params"` - } - if err := c.ShouldBindJSON(&req); err != nil { - response.Error(c, 400, "参数错误") - return - } - - response.Success(c, gin.H{ - "result": nil, - }) -} - func handleAppCreateVariableRecord(c *gin.Context) { appKey := c.Param("appKey") key := c.Param("key")