API: remove various associated fields included by default.
Remove various associated fields that were included by default on certain endpoints. API users can use the only param to include the full association if they need these fields. * /artists.json: urls. * /artist_urls.json: artist. * /comments.json: creator_name and updater_name. * /notes.json: creator_name. * /pools.json: creator_name. * /posts.json: uploader_name, children_ids, pixiv_ugoira_frame_data. * /post_appeals.json: is_resolved. * /post_versions.json: updater_name. * /uploads.json: uploader_name.
This commit is contained in:
@@ -266,12 +266,8 @@ class PostArchive < ApplicationRecord
|
||||
post&.visible? && user.is_member?
|
||||
end
|
||||
|
||||
def updater_name
|
||||
updater&.name
|
||||
end
|
||||
|
||||
def api_attributes
|
||||
super + [:obsolete_added_tags, :obsolete_removed_tags, :unchanged_tags, :updater_name]
|
||||
super + [:obsolete_added_tags, :obsolete_removed_tags, :unchanged_tags]
|
||||
end
|
||||
|
||||
def self.available_includes
|
||||
|
||||
Reference in New Issue
Block a user