Added account featured tags API (#11817)
This commit is contained in:
parent
17340365bb
commit
33ad850c98
3 changed files with 42 additions and 0 deletions
19
app/serializers/rest/account_featured_tag_serializer.rb
Normal file
19
app/serializers/rest/account_featured_tag_serializer.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class REST::AccountFeaturedTagSerializer < ActiveModel::Serializer
|
||||
include RoutingHelper
|
||||
|
||||
attributes :id, :name, :url
|
||||
|
||||
def id
|
||||
object.tag.id.to_s
|
||||
end
|
||||
|
||||
def name
|
||||
"##{object.name}"
|
||||
end
|
||||
|
||||
def url
|
||||
short_account_tag_url(object.account, object.tag)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue