The code powering m.abunchtell.com https://m.abunchtell.com
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

14 lignes
451 B

  1. # frozen_string_literal: true
  2. class Api::V1::PollsController < Api::BaseController
  3. before_action -> { authorize_if_got_token! :read, :'read:statuses' }, only: :show
  4. respond_to :json
  5. def show
  6. @poll = Poll.attached.find(params[:id])
  7. ActivityPub::FetchRemotePollService.new.call(@poll, current_account) if user_signed_in? && @poll.possibly_stale?
  8. render json: @poll, serializer: REST::PollSerializer, include_results: true
  9. end
  10. end