def destroy
authorize @account, :destroy?
+ json = render_to_body json: @account, serializer: REST::Admin::AccountSerializer
Admin::AccountDeletionWorker.perform_async(@account.id)
- render json: @account, serializer: REST::Admin::AccountSerializer
+ render json: json
end
def unsensitive
authorize @status, :destroy?
@status.discard
- RemovalWorker.perform_async(@status.id, { 'redraft' => true })
@status.account.statuses_count = @status.account.statuses_count - 1
+ json = render_to_body json: @status, serializer: REST::StatusSerializer, source_requested: true
+
+ RemovalWorker.perform_async(@status.id, { 'redraft' => true })
- render json: @status, serializer: REST::StatusSerializer, source_requested: true
+ render json: json
end
private