Exemple #1
0
func (this *ReplyController) Add() {
	id := this.Input().Get("id")
	nickname := this.Input().Get("nickname")
	content := this.Input().Get("content")
	err := models.AddReply(id, nickname, content)
	if err != nil {
		beego.Error(err)
	}
	this.Redirect("/topic/view/"+id, 302)
}
Exemple #2
0
func (this *ReplyController) Add() {
	tid := this.Input().Get("tid")
	err := models.AddReply(tid,
		this.Input().Get("nickname"), this.Input().Get("content"))
	if err != nil {
		beego.Error(err)
	}

	this.Redirect("/topic/view/"+tid, 302)
}
Exemple #3
0
func (this *TopicController) Post() {

	err := models.AddReply(this.Input().Get("title"), this.Input().Get("content"), this.Input().Get("nickname"), this.Input().Get("tid"))

	if err != nil {
		beego.Error(err)
	}

	this.Redirect("/topic/view?id="+this.Input().Get("tid"), 301)
	return
}