FEATURE: Add category_id to TopicViewWordpressSerializer (#10372)

FEATURE: Add category_id to TopicViewWordpressSerializer (#10372)

diff --git a/app/serializers/topic_view_wordpress_serializer.rb b/app/serializers/topic_view_wordpress_serializer.rb
index d7274d5..b4e7610 100644
--- a/app/serializers/topic_view_wordpress_serializer.rb
+++ b/app/serializers/topic_view_wordpress_serializer.rb
@@ -4,6 +4,7 @@ class TopicViewWordpressSerializer < ApplicationSerializer
 
   # These attributes will be delegated to the topic
   attributes :id,
+             :category_id,
              :posts_count,
              :filtered_posts_count,
              :posts
@@ -15,6 +16,10 @@ class TopicViewWordpressSerializer < ApplicationSerializer
     object.topic.id
   end
 
+  def category_id
+    object.topic.category_id
+  end
+
   def posts_count
     object.topic.posts_count
   end

GitHub sha: f78792c7

This commit appears in #10372 which was merged by SamSaffron.