about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-09-13 16:11:13 +0200
committerGitHub <noreply@github.com>2019-09-13 16:11:13 +0200
commit18331fefa2246facc818226043b1f9cc67cf6c1a (patch)
tree38b9fa73e03c34bca84080f822eb8b3bc327ed09 /app/serializers
parentcf2b708e6bf46db592199b757db9747005f6984d (diff)
Remove deprecated `GET /api/v1/search` API (#11823)
Use `GET /api/v2/search` instead
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/rest/search_serializer.rb7
-rw-r--r--app/serializers/rest/v2/search_serializer.rb7
2 files changed, 1 insertions, 13 deletions
diff --git a/app/serializers/rest/search_serializer.rb b/app/serializers/rest/search_serializer.rb
index 157f543ae..ee9b421eb 100644
--- a/app/serializers/rest/search_serializer.rb
+++ b/app/serializers/rest/search_serializer.rb
@@ -1,12 +1,7 @@
 # frozen_string_literal: true
 
 class REST::SearchSerializer < ActiveModel::Serializer
-  attributes :hashtags
-
   has_many :accounts, serializer: REST::AccountSerializer
   has_many :statuses, serializer: REST::StatusSerializer
-
-  def hashtags
-    object.hashtags.map(&:name)
-  end
+  has_many :hashtags, serializer: REST::TagSerializer
 end
diff --git a/app/serializers/rest/v2/search_serializer.rb b/app/serializers/rest/v2/search_serializer.rb
deleted file mode 100644
index cdb6b3a53..000000000
--- a/app/serializers/rest/v2/search_serializer.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class REST::V2::SearchSerializer < ActiveModel::Serializer
-  has_many :accounts, serializer: REST::AccountSerializer
-  has_many :statuses, serializer: REST::StatusSerializer
-  has_many :hashtags, serializer: REST::TagSerializer
-end