fix comments count

This commit is contained in:
deepzz0
2016-11-27 20:29:07 +08:00
parent 9f3fde150b
commit 0bd4c7d7dc

View File

@@ -274,9 +274,7 @@ func HandleDisqus(c *gin.Context) {
if postsList.Cursor.HasNext {
dcs.Data.Next = postsList.Cursor.Next
}
if cursor == "" {
dcs.Data.Total = Ei.MapArticles[slug].Count
}
dcs.Data.Total = Ei.MapArticles[slug].Count
dcs.Data.Comments = make([]commentsDetail, len(postsList.Response))
for i, v := range postsList.Response {
dcs.Data.Comments[i] = commentsDetail{