This commit is contained in:
@@ -8,7 +8,7 @@ module PostRepr
|
|||||||
|
|
||||||
def base post, current_user = nil
|
def base post, current_user = nil
|
||||||
json = post.as_json(BASE)
|
json = post.as_json(BASE)
|
||||||
return json unless current_user
|
return json.merge(viewed: false) unless current_user
|
||||||
|
|
||||||
viewed = current_user.viewed?(post)
|
viewed = current_user.viewed?(post)
|
||||||
json.merge(viewed:)
|
json.merge(viewed:)
|
||||||
|
|||||||
Reference in New Issue
Block a user