diff options
author | FChannel <=> | 2021-01-25 13:15:01 -0800 |
---|---|---|
committer | FChannel <=> | 2021-01-25 13:15:01 -0800 |
commit | aa76455a3dfd4504697e1b3fdb33e0aeb01db4d7 (patch) | |
tree | 2a1d10209fec528d20add450d1454773ee1ef5fa | |
parent | e5a02f492854d7c3f8d4fd44ccb512b0da40d952 (diff) |
remove double posts
-rw-r--r-- | CacheDatabase.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/CacheDatabase.go b/CacheDatabase.go index 5b8a6d0..7b60bd6 100644 --- a/CacheDatabase.go +++ b/CacheDatabase.go @@ -232,14 +232,7 @@ func GetObjectFromCache(db *sql.DB, id string) Collection { var postCnt int var imgCnt int - post.Replies, postCnt, imgCnt = GetObjectRepliesCache(db, post) - - var localPost ObjectBase - localPost.Replies, postCnt, imgCnt = GetObjectRepliesDB(db, post) - - for _, e := range localPost.Replies.OrderedItems { - post.Replies.OrderedItems = append(post.Replies.OrderedItems, e) - } + post.Replies, postCnt, imgCnt = GetObjectRepliesDB(db, post) post.Replies.TotalItems, post.Replies.TotalImgs = GetObjectRepliesCacheCount(db, post) |