|
@@ -6,6 +6,7 @@ import (
|
|
|
"dcl_dispatch_server/src/package/global"
|
|
|
"dcl_dispatch_server/src/package/infra"
|
|
|
"github.com/gin-gonic/gin"
|
|
|
+ "io"
|
|
|
"net/http"
|
|
|
)
|
|
|
|
|
@@ -117,8 +118,18 @@ import (
|
|
|
*/
|
|
|
|
|
|
func StartProject(c *gin.Context) {
|
|
|
+
|
|
|
projectStartParam := new(entity.Project)
|
|
|
if err := c.ShouldBindJSON(&projectStartParam); err != nil {
|
|
|
+ // 读取请求体
|
|
|
+ bodyBytes, err := io.ReadAll(c.Request.Body)
|
|
|
+ if err != nil {
|
|
|
+ c.String(500, "Error reading request body")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 将请求体转换为字符串
|
|
|
+ bodyString := string(bodyBytes)
|
|
|
+ infra.GlobalLogger.Error("项目启动接收请求参数为:", bodyString)
|
|
|
infra.GlobalLogger.Error("项目启动接收请求参数报错:", err)
|
|
|
c.JSON(http.StatusBadRequest, entity.HttpResult{Status: false, Code: "1003", Message: "请求参数格式错误。"})
|
|
|
return
|