test calc
This commit is contained in:
parent
1f56a9fbec
commit
bf4de8a8d8
|
@ -80,6 +80,7 @@ func (c *Calculator) List(ctx *gin.Context) {
|
||||||
// Delete 删除指定的计算项
|
// Delete 删除指定的计算项
|
||||||
func (c *Calculator) Test(ctx *gin.Context) {
|
func (c *Calculator) Test(ctx *gin.Context) {
|
||||||
var req api.TestCalculatorReq
|
var req api.TestCalculatorReq
|
||||||
|
session.CheckParamError(ctx.ShouldBindJSON(&req))
|
||||||
sess := ctx.Keys[session.ContextSession].(*session.AdminSession)
|
sess := ctx.Keys[session.ContextSession].(*session.AdminSession)
|
||||||
data := service.NewCalculator().Test(sess, &req)
|
data := service.NewCalculator().Test(sess, &req)
|
||||||
ctx.JSON(http.StatusOK, session.NewRsp(data))
|
ctx.JSON(http.StatusOK, session.NewRsp(data))
|
||||||
|
|
Loading…
Reference in New Issue