proofs_controller.rb 462 B

1234567891011121314151617181920212223
  1. # frozen_string_literal: true
  2. class Api::ProofsController < Api::BaseController
  3. include AccountOwnedConcern
  4. skip_before_action :require_authenticated_user!
  5. before_action :set_provider
  6. def index
  7. render json: @account, serializer: @provider.serializer_class
  8. end
  9. private
  10. def set_provider
  11. @provider = ProofProvider.find(params[:provider]) || raise(ActiveRecord::RecordNotFound)
  12. end
  13. def username_param
  14. params[:username]
  15. end
  16. end