diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-01-18 18:41:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 18:41:24 +0100 |
commit | 01405bc6f84fd9cfb974e1e668465148bda47ac5 (patch) | |
tree | cb3103c82a337178a3548e1a157e0fa94be37bdb /app/controllers/api | |
parent | 472fd4307f9c963aba57e537e3ca3a8f94dfa139 (diff) | |
parent | 3f74235ac5b6ce6f13c531506f30c466da2a7aa1 (diff) |
Merge pull request #2087 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/api')
-rw-r--r-- | app/controllers/api/v1/admin/trends/tags_controller.rb | 8 | ||||
-rw-r--r-- | app/controllers/api/v1/statuses_controller.rb | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/app/controllers/api/v1/admin/trends/tags_controller.rb b/app/controllers/api/v1/admin/trends/tags_controller.rb index f3c0c4b6b..e77df3021 100644 --- a/app/controllers/api/v1/admin/trends/tags_controller.rb +++ b/app/controllers/api/v1/admin/trends/tags_controller.rb @@ -3,6 +3,14 @@ class Api::V1::Admin::Trends::TagsController < Api::V1::Trends::TagsController before_action -> { authorize_if_got_token! :'admin:read' } + def index + if current_user&.can?(:manage_taxonomies) + render json: @tags, each_serializer: REST::Admin::TagSerializer + else + super + end + end + private def enabled? diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index e2e48f633..3a9cf056b 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -80,6 +80,7 @@ class Api::V1::StatusesController < Api::BaseController current_account.id, text: status_params[:status], media_ids: status_params[:media_ids], + media_attributes: status_params[:media_attributes], sensitive: status_params[:sensitive], language: status_params[:language], spoiler_text: status_params[:spoiler_text], @@ -131,6 +132,12 @@ class Api::V1::StatusesController < Api::BaseController :scheduled_at, :content_type, media_ids: [], + media_attributes: [ + :id, + :thumbnail, + :description, + :focus, + ], poll: [ :multiple, :hide_totals, |