From 1254fd6967dc38ef451dfe3792ac7dabf13c9663 Mon Sep 17 00:00:00 2001 From: tanyb Date: Wed, 14 May 2014 17:59:01 +0800 Subject: [PATCH] Update 13.5.md this.Ctx.Input.Params is map, not fund --- ebook/13.5.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ebook/13.5.md b/ebook/13.5.md index fd76d35d..226477a5 100644 --- a/ebook/13.5.md +++ b/ebook/13.5.md @@ -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,9 +124,9 @@ 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 + this.Data["Post"] = blog models.DelBlog(blog) this.Ctx.Redirect(302, "/") }