diff options
author | Reverite <github@reverite.sh> | 2019-07-07 16:25:42 -0700 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-07-07 16:25:42 -0700 |
commit | 7d99f12fd03cf2f861d0747c3bbcd4a8cf454d99 (patch) | |
tree | 7b166c33fefb4bf3cc6f6dee46f5883f7428d80a /app/controllers | |
parent | 100bb17b1317f07c0eaa89da869f960b6cff611f (diff) | |
parent | fce885f271f8651702d606406e21677280071e40 (diff) |
Merge branch 'glitch' into production
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 26a0ab457..4e7476a84 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], |