Skip to content

Commit 3809e57

Browse files
committed
Merge pull request astaxie#341 from july-12/patch-1
a very little mistake
2 parents 71214ef + 1254fd6 commit 3809e57

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ebook/13.5.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ EditController
100100
}
101101

102102
func (this *EditController) Get() {
103-
id, _ := strconv.Atoi(this.Ctx.Input.Params(":id"))
103+
id, _ := strconv.Atoi(this.Ctx.Input.Params[":id"])
104104
this.Data["Post"] = models.GetBlog(id)
105105
this.Layout = "layout.tpl"
106106
this.TplNames = "new.tpl"
@@ -124,9 +124,9 @@ DeleteController
124124
}
125125

126126
func (this *DeleteController) Get() {
127-
id, _ := strconv.Atoi(this.Ctx.Input.Params(":id"))
127+
id, _ := strconv.Atoi(this.Ctx.Input.Params(":id"))
128128
blog := GetBlog(id int)
129-
this.Data["Post"] = blog
129+
this.Data["Post"] = blog
130130
models.DelBlog(blog)
131131
this.Ctx.Redirect(302, "/")
132132
}

0 commit comments

Comments
 (0)