about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-05-29 02:01:24 +0200
committerGitHub <noreply@github.com>2018-05-29 02:01:24 +0200
commit8bb74e50beb3e6602c183e59086ccebe87f96fb2 (patch)
treecec5f848686a777a5318ed51cf9b7560414cc527 /app/serializers
parent90b64c006998ec3bae365007781c61e8a79eeeef (diff)
Add GET /api/v2/search which returns rich tag objects, adjust web UI (#7661)
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/rest/v2/search_serializer.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/serializers/rest/v2/search_serializer.rb b/app/serializers/rest/v2/search_serializer.rb
new file mode 100644
index 000000000..cdb6b3a53
--- /dev/null
+++ b/app/serializers/rest/v2/search_serializer.rb
@@ -0,0 +1,7 @@
+# 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