diff --git a/server/controller/calculator.go b/server/controller/calculator.go index baf58ad..30c96e2 100644 --- a/server/controller/calculator.go +++ b/server/controller/calculator.go @@ -80,6 +80,7 @@ func (c *Calculator) List(ctx *gin.Context) { // Delete 删除指定的计算项 func (c *Calculator) Test(ctx *gin.Context) { var req api.TestCalculatorReq + session.CheckParamError(ctx.ShouldBindJSON(&req)) sess := ctx.Keys[session.ContextSession].(*session.AdminSession) data := service.NewCalculator().Test(sess, &req) ctx.JSON(http.StatusOK, session.NewRsp(data))