1
0
mirror of https://github.com/beego/bee.git synced 2025-07-05 18:20:18 +00:00

ServeJson-->ServeJSON,update to match beego develop

This commit is contained in:
fugr
2015-10-22 11:32:21 +08:00
parent 581b80bc6c
commit dec41734bd
3 changed files with 24 additions and 24 deletions

View File

@ -181,7 +181,7 @@ func (c *{{controllerName}}Controller) Post() {
} else {
c.Data["json"] = err.Error()
}
c.ServeJson()
c.ServeJSON()
}
// @Title Get
@ -199,7 +199,7 @@ func (c *{{controllerName}}Controller) GetOne() {
} else {
c.Data["json"] = v
}
c.ServeJson()
c.ServeJSON()
}
// @Title Get All
@ -247,7 +247,7 @@ func (c *{{controllerName}}Controller) GetAll() {
kv := strings.Split(cond, ":")
if len(kv) != 2 {
c.Data["json"] = errors.New("Error: invalid query key/value pair")
c.ServeJson()
c.ServeJSON()
return
}
k, v := kv[0], kv[1]
@ -261,7 +261,7 @@ func (c *{{controllerName}}Controller) GetAll() {
} else {
c.Data["json"] = l
}
c.ServeJson()
c.ServeJSON()
}
// @Title Update
@ -281,7 +281,7 @@ func (c *{{controllerName}}Controller) Put() {
} else {
c.Data["json"] = err.Error()
}
c.ServeJson()
c.ServeJSON()
}
// @Title Delete
@ -298,6 +298,6 @@ func (c *{{controllerName}}Controller) Delete() {
} else {
c.Data["json"] = err.Error()
}
c.ServeJson()
c.ServeJSON()
}
`