diff --git a/app/mix/controller/init.go b/app/mix/controller/init.go index 0509259b..ef1c4f7d 100644 --- a/app/mix/controller/init.go +++ b/app/mix/controller/init.go @@ -481,8 +481,9 @@ func ReplyJsonError(ctx *gin.Context, code int, msg string) { } func PrepareOp() gin.HandlerFunc { + defer logger.Recover() + return func(ctx *gin.Context) { - defer logger.Recover() //if ctx.ClientIP() != "127.0.0.1" { // ReplyJsonError(ctx, http.StatusBadRequest, fmt.Sprintf("not localhost, ip: %s", ctx.ClientIP())) // return diff --git a/app/mix/controller/vas_op.go b/app/mix/controller/vas_op.go index 912ba5f3..6b614c9e 100644 --- a/app/mix/controller/vas_op.go +++ b/app/mix/controller/vas_op.go @@ -10,7 +10,7 @@ import ( ) func OpCoinOrderList(ctx *gin.Context) { - defer logger.Recover() + //defer logger.Recover() req := ctx.MustGet("client_req").(*vasproto.OpCoinOrderListReq) if req.Limit <= 0 { req.Limit = 1000 @@ -28,7 +28,7 @@ func OpCoinOrderList(ctx *gin.Context) { } func OpOrderList(ctx *gin.Context) { - defer logger.Recover() + //defer logger.Recover() req := ctx.MustGet("client_req").(*vasproto.OpOrderListReq) if req.Limit <= 0 { req.Limit = 1000