From 4181ea8620c1ad2c6936ac012b0bfc589d519b9b Mon Sep 17 00:00:00 2001 From: Pengfei Xue Date: Thu, 5 Dec 2013 10:29:04 +0800 Subject: [PATCH] beeapi example is broken --- example/beeapi/controllers/default.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/beeapi/controllers/default.go b/example/beeapi/controllers/default.go index 93eab5ef..88903b4b 100644 --- a/example/beeapi/controllers/default.go +++ b/example/beeapi/controllers/default.go @@ -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()