예제 #1
0
파일: post.go 프로젝트: trigrass2/wego
//Get most replys posts
func (this *PostListRouter) setMostReplysPosts(posts *[]models.Post) {
	err := models.MostReplysPostsByExample(posts, &models.Post{})
	if err != nil {
		this.Result = err
		return
	}
	this.Data["MostReplysPosts"] = posts
}
예제 #2
0
파일: post.go 프로젝트: trigrass2/wego
//Get most replys posts of category
func (this *PostListRouter) setMostReplysPostsOfCategory(posts *[]models.Post, cat *models.Category) {
	err := models.MostReplysPostsByExample(posts, &models.Post{CategoryId: cat.Id})
	if err != nil {
		this.Result = err
		return
	}
	this.Data["MostReplysPosts"] = posts
}
예제 #3
0
파일: post.go 프로젝트: trigrass2/wego
//Get most replys post of topic
func (this *PostListRouter) setMostReplysPostsOfTopic(posts *[]models.Post, topic *models.Topic) {
	err := models.MostReplysPostsByExample(posts, &models.Post{TopicId: topic.Id})
	if err != nil {
		this.Result = err
		return
	}
	this.Data["MostReplysPosts"] = posts
}