diff --git a/ebook/13.5.md b/ebook/13.5.md index b433d12f..fd76d35d 100644 --- a/ebook/13.5.md +++ b/ebook/13.5.md @@ -66,7 +66,7 @@ ViewController: } func (this *ViewController) Get() { - id, _ := strconv.Atoi(this.Ctx.Input.Params[":id"]) + id, _ := strconv.Atoi(this.Ctx.Input.Params(":id")) this.Data["Post"] = models.GetBlog(id) this.Layout = "layout.tpl" this.TplNames = "view.tpl" @@ -100,7 +100,7 @@ EditController } func (this *EditController) Get() { - id, _ := strconv.Atoi(this.Ctx.Input.Params[":id"]) + id, _ := strconv.Atoi(this.Ctx.Input.Params(":id")) this.Data["Post"] = models.GetBlog(id) this.Layout = "layout.tpl" this.TplNames = "new.tpl" @@ -124,7 +124,7 @@ DeleteController } func (this *DeleteController) Get() { - id, _ := strconv.Atoi(this.Ctx.Input.Params[":id"]) + id, _ := strconv.Atoi(this.Ctx.Input.Params(":id")) blog := GetBlog(id int) this.Data["Post"] = blog models.DelBlog(blog)