about summary refs log tree commit diff
path: root/app/serializers/rest
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/rest')
-rw-r--r--app/serializers/rest/account_featured_tag_serializer.rb15
-rw-r--r--app/serializers/rest/featured_tag_serializer.rb8
2 files changed, 7 insertions, 16 deletions
diff --git a/app/serializers/rest/account_featured_tag_serializer.rb b/app/serializers/rest/account_featured_tag_serializer.rb
deleted file mode 100644
index 84bef2e62..000000000
--- a/app/serializers/rest/account_featured_tag_serializer.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class REST::AccountFeaturedTagSerializer < ActiveModel::Serializer
-  include RoutingHelper
-
-  attributes :id, :name, :url
-
-  def id
-    object.tag.id.to_s
-  end
-
-  def url
-    short_account_tag_url(object.account, object.tag)
-  end
-end
diff --git a/app/serializers/rest/featured_tag_serializer.rb b/app/serializers/rest/featured_tag_serializer.rb
index 08121ff16..96adcc7d0 100644
--- a/app/serializers/rest/featured_tag_serializer.rb
+++ b/app/serializers/rest/featured_tag_serializer.rb
@@ -1,9 +1,15 @@
 # frozen_string_literal: true
 
 class REST::FeaturedTagSerializer < ActiveModel::Serializer
-  attributes :id, :name, :statuses_count, :last_status_at
+  include RoutingHelper
+
+  attributes :id, :name, :url, :statuses_count, :last_status_at
 
   def id
     object.id.to_s
   end
+
+  def url
+    short_account_tag_url(object.account, object.tag)
+  end
 end