Commit 9f3058ca authored by astaxie's avatar astaxie

Merge pull request #335 from pengfei-xue/devel

beeapi example is broken
parents cfc604b5 4181ea86
......@@ -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()
......
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