Commit 5ced1b27 by usual2970

勾子回调测试

parent 50bf2f33
...@@ -4,7 +4,7 @@ import ( ...@@ -4,7 +4,7 @@ import (
"github.com/astaxie/beego" "github.com/astaxie/beego"
//"github.com/usual2970/util/git-module" //"github.com/usual2970/util/git-module"
"github.com/astaxie/beego/logs" "github.com/astaxie/beego/logs"
//"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
) )
type GitController struct { type GitController struct {
...@@ -30,9 +30,13 @@ type PData struct{ ...@@ -30,9 +30,13 @@ type PData struct{
* @return {[type]} [description] * @return {[type]} [description]
*/ */
func (c *GitController) Hook() { func (c *GitController) Hook() {
//resp:=&HookInfo{} resp:=&HookInfo{}
//ffjson.Unmarshal(c.Ctx.Input.RequestBody,resp) //ffjson.Unmarshal(c.Ctx.Input.RequestBody,resp)
log.Info(string(c.Ctx.Input.RequestBody)) pc:=c.Ctx.Input.RequestBody
log.Info(string(pc))
ffjson.Unmarshal(pc,resp)
log.Info(resp.HookName)
// str:=`{ // str:=`{
// "password": "hod20x4hnkecy63", // "password": "hod20x4hnkecy63",
// "hook_name": "push_hooks", // "hook_name": "push_hooks",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment