1
0
réplica de https://github.com/astaxie/beego.git synced 2025-07-04 03:40:18 +00:00

beeapi example is broken

Este commit está contenido en:
Pengfei Xue
2013-12-05 10:29:04 +08:00
padre cfc604b53d
commit 4181ea8620

Ver fichero

@ -19,7 +19,7 @@ func (this *ObjectController) Post() {
}
func (this *ObjectController) Get() {
objectId := this.Ctx.Input.Param[":objectId"]
objectId := this.Ctx.Input.Params[":objectId"]
if objectId != "" {
ob, err := models.GetOne(objectId)
if err != nil {
@ -35,7 +35,7 @@ func (this *ObjectController) Get() {
}
func (this *ObjectController) Put() {
objectId := this.Ctx.Input.Param[":objectId"]
objectId := this.Ctx.Input.Params[":objectId"]
var ob models.Object
json.Unmarshal(this.Ctx.Input.RequestBody, &ob)
@ -49,7 +49,7 @@ func (this *ObjectController) Put() {
}
func (this *ObjectController) Delete() {
objectId := this.Ctx.Input.Param[":objectId"]
objectId := this.Ctx.Input.Params[":objectId"]
models.Delete(objectId)
this.Data["json"] = "delete success!"
this.ServeJson()