diff --git a/backend/app/representations/post_repr.rb b/backend/app/representations/post_repr.rb index 2dc444f..bcba375 100644 --- a/backend/app/representations/post_repr.rb +++ b/backend/app/representations/post_repr.rb @@ -8,7 +8,7 @@ module PostRepr def base post, current_user = nil json = post.as_json(BASE) - return json unless current_user + return json.merge(viewed: false) unless current_user viewed = current_user.viewed?(post) json.merge(viewed:)