diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-07-05 02:15:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-05 02:15:24 +0200 |
commit | 0c1b1069c96d3452d43d922a737c522d10e4747b (patch) | |
tree | 16aa167d60f75941232659452352fa07c0dee5b5 /app/controllers | |
parent | 30f5bcf3e749be9651ed39a07b893f70605f8a39 (diff) |
Remove deprecated REST API `GET /api/v1/statuses/:id/card` (#11213)
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/api/v1/statuses_controller.rb | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index b0e134554..71a505c26 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -5,8 +5,8 @@ class Api::V1::StatusesController < Api::BaseController before_action -> { authorize_if_got_token! :read, :'read:statuses' }, except: [:create, :destroy] before_action -> { doorkeeper_authorize! :write, :'write:statuses' }, only: [:create, :destroy] - before_action :require_user!, except: [:show, :context, :card] - before_action :set_status, only: [:show, :context, :card] + before_action :require_user!, except: [:show, :context] + before_action :set_status, only: [:show, :context] respond_to :json @@ -33,16 +33,6 @@ class Api::V1::StatusesController < Api::BaseController render json: @context, serializer: REST::ContextSerializer, relationships: StatusRelationshipsPresenter.new(statuses, current_user&.account_id) end - def card - @card = @status.preview_cards.first - - if @card.nil? - render_empty - else - render json: @card, serializer: REST::PreviewCardSerializer - end - end - def create @status = PostStatusService.new.call(current_user.account, text: status_params[:status], |