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

@ -1178,7 +1178,7 @@ func (c *{{ctrlName}}Controller) Post() {
} else {
c.Data["json"] = err.Error()
}
c.ServeJson()
c.ServeJSON()
}
// @Title Get
@ -1196,7 +1196,7 @@ func (c *{{ctrlName}}Controller) GetOne() {
} else {
c.Data["json"] = v
}
c.ServeJson()
c.ServeJSON()
}
// @Title Get All
@ -1244,7 +1244,7 @@ func (c *{{ctrlName}}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]
@ -1258,7 +1258,7 @@ func (c *{{ctrlName}}Controller) GetAll() {
} else {
c.Data["json"] = l
}
c.ServeJson()
c.ServeJSON()
}
// @Title Update
@ -1278,7 +1278,7 @@ func (c *{{ctrlName}}Controller) Put() {
} else {
c.Data["json"] = err.Error()
}
c.ServeJson()
c.ServeJSON()
}
// @Title Delete
@ -1295,7 +1295,7 @@ func (c *{{ctrlName}}Controller) Delete() {
} else {
c.Data["json"] = err.Error()
}
c.ServeJson()
c.ServeJSON()
}
`
ROUTER_TPL = `// @APIVersion 1.0.0