Commiting

This commit is contained in:
mgabdev
2020-11-25 15:22:37 -06:00
parent fb612f60c8
commit b4e370d3d3
136 changed files with 4171 additions and 3231 deletions

View File

@@ -0,0 +1,22 @@
# frozen_string_literal: true
class REST::StatusBookmarkedSerializer < ActiveModel::Serializer
attributes :status_id, :account_id, :bookmarked
def status_id
object.id.to_s
end
def account_id
current_user.account.id
end
def bookmarked
if !current_user.nil?
current_user.account.bookmarked?(object)
else
false
end
end
end