28 lines
596 B
Go
28 lines
596 B
Go
package controllers
|
|
|
|
import (
|
|
"git.rosy.net.cn/baseapi/utils"
|
|
"git.rosy.net.cn/jx-callback/globals"
|
|
beego "github.com/astaxie/beego/server/web"
|
|
)
|
|
|
|
type PrintController struct {
|
|
beego.Controller
|
|
}
|
|
|
|
type CallBackPrint struct {
|
|
Data string `json:"data"`
|
|
Code string `json:"code"`
|
|
}
|
|
|
|
func (c *PrintController) Msg() {
|
|
//if c.Ctx.Input.Method() == http.MethodPost {
|
|
callBackPrint := &CallBackPrint{}
|
|
globals.SugarLogger.Debugf("print callback callbackResponse:%s", utils.Format4Output(c.Ctx.Request, true))
|
|
c.Data["json"] = callBackPrint
|
|
c.ServeJSON()
|
|
//} else {
|
|
// c.Abort("404")
|
|
//}
|
|
}
|