This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2019-03-18 21:00:55 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Api::ProofsController < Api::BaseController
|
2019-07-08 12:03:45 +02:00
|
|
|
include AccountOwnedConcern
|
|
|
|
|
2019-11-28 04:07:49 +01:00
|
|
|
skip_before_action :require_authenticated_user!
|
|
|
|
|
2019-03-18 21:00:55 +01:00
|
|
|
before_action :set_provider
|
|
|
|
|
|
|
|
def index
|
|
|
|
render json: @account, serializer: @provider.serializer_class
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def set_provider
|
|
|
|
@provider = ProofProvider.find(params[:provider]) || raise(ActiveRecord::RecordNotFound)
|
|
|
|
end
|
|
|
|
|
2019-07-08 12:03:45 +02:00
|
|
|
def username_param
|
|
|
|
params[:username]
|
2019-03-18 21:00:55 +01:00
|
|
|
end
|
|
|
|
end
|