mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 23:41:37 +01:00
Temporarily undo tag_serializer changes due to an error
This commit is contained in:
parent
65efd9a77d
commit
dc03059a7b
1 changed files with 0 additions and 14 deletions
|
@ -5,8 +5,6 @@ class REST::TagSerializer < ActiveModel::Serializer
|
|||
|
||||
attributes :name, :url, :history
|
||||
|
||||
attribute :following, if: :current_user?
|
||||
|
||||
def url
|
||||
tag_url(object)
|
||||
end
|
||||
|
@ -14,16 +12,4 @@ class REST::TagSerializer < ActiveModel::Serializer
|
|||
def name
|
||||
object.display_name
|
||||
end
|
||||
|
||||
def following
|
||||
if instance_options && instance_options[:relationships]
|
||||
instance_options[:relationships].following_map[object.id] || false
|
||||
else
|
||||
TagFollow.where(tag_id: object.id, account_id: current_user.account_id).exists?
|
||||
end
|
||||
end
|
||||
|
||||
def current_user?
|
||||
!current_user.nil?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue