File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ ViewController:
66
66
}
67
67
68
68
func (this *ViewController) Get() {
69
- id, _ := strconv.Atoi(this.Ctx.Input.Params[ ":id"] )
69
+ id, _ := strconv.Atoi(this.Ctx.Input.Params( ":id") )
70
70
this.Data["Post"] = models.GetBlog(id)
71
71
this.Layout = "layout.tpl"
72
72
this.TplNames = "view.tpl"
@@ -100,7 +100,7 @@ EditController
100
100
}
101
101
102
102
func (this *EditController) Get() {
103
- id, _ := strconv.Atoi(this.Ctx.Input.Params[ ":id"] )
103
+ id, _ := strconv.Atoi(this.Ctx.Input.Params( ":id") )
104
104
this.Data["Post"] = models.GetBlog(id)
105
105
this.Layout = "layout.tpl"
106
106
this.TplNames = "new.tpl"
@@ -124,7 +124,7 @@ DeleteController
124
124
}
125
125
126
126
func (this *DeleteController) Get() {
127
- id, _ := strconv.Atoi(this.Ctx.Input.Params[ ":id"] )
127
+ id, _ := strconv.Atoi(this.Ctx.Input.Params( ":id") )
128
128
blog := GetBlog(id int)
129
129
this.Data["Post"] = blog
130
130
models.DelBlog(blog)
You can’t perform that action at this time.
0 commit comments