[API] Add if post has notes

This commit is contained in:
Kira 2020-06-26 17:52:00 -07:00
parent 1ad46c6dbe
commit 11a6a2e64a

View File

@ -97,7 +97,11 @@ class PostSerializer < ActiveModel::Serializer
object.is_favorited?
end
def has_notes
object.has_notes?
end
attributes :id, :created_at, :updated_at, :file, :preview, :sample, :score, :tags, :locked_tags, :change_seq, :flags,
:rating, :fav_count, :sources, :pools, :relationships, :approver_id, :uploader_id, :description,
:comment_count, :is_favorited
:comment_count, :is_favorited, :has_notes
end