func (this *DeleteController) Get() { if this.GetSession("root") == "huangxiaohen" && this.GetSession("passwd") == "1314521" { var id int this.Ctx.Input.Bind(&id, ":id") this.Data["Post"] = models.DelBlog(id) } this.Ctx.Redirect(302, "/") }
func (this *DeleteController) Get() { //inputs := this.Input() id, _ := strconv.Atoi(this.Ctx.Input.Params[":id"]) models.DelBlog(id) this.Ctx.Redirect(302, "/") }