fix: add memos read data not increment view count

This commit is contained in:
yystopf 2021-11-11 17:44:02 +08:00
parent 21b55eba83
commit f941976a78
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ class MemosService
:filesize => memo_image.filesize} if memo_image
user_praise = PraiseTread.is_user_praise(memo.id, "Memo", current_user.try(:id)).exists?
memo.update_column(:viewed_count, memo.viewed_count + 1)
memo.update_column(:viewed_count, memo.viewed_count + 1) if params[:only_data].blank?
# 帖子的回复
memos = memo.reply_for_memo
unless current_user.try(:admin?) # 只有管理员和发布人能看到隐藏的回复