func (this *TopicController) Delete() { tid := this.Ctx.Input.Param("0") err := models.DeleteTopic(tid) if err != nil { beego.Error(err) this.Redirect("/", 302) return } this.Redirect("/", 302) return }
func (this *TopicController) Delete() { if !checkAccount(this.Ctx) { this.Redirect("/login", 302) return } err := models.DeleteTopic(this.Input().Get("tid")) if err != nil { beego.Error(err) } this.Redirect("/topic", 302) }