FEATURE: add first post likes data serializer (#31216)

This PR adds two attributes (`op_can_like` & `op_liked`) to
`TopicListItemSerializer`.

We've also added `serialize_topic_op_likes_data` theme modifier so that
these two attributes are only added when a theme or component needs this
data.
This commit is contained in:
Arpit Jalan
2025-02-06 20:50:30 +05:30
committed by GitHub
parent bc29fbeac8
commit aa222ef7b8
4 changed files with 114 additions and 9 deletions

View File

@ -0,0 +1,6 @@
# frozen_string_literal: true
class AddSerializeTopicOpLikesDataThemeModifier < ActiveRecord::Migration[7.2]
def change
add_column :theme_modifier_sets, :serialize_topic_op_likes_data, :boolean, null: true
end
end