This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2019-03-18 13:00:55 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Api::ProofsController < Api::BaseController
|
2019-07-08 03:03:45 -07:00
|
|
|
include AccountOwnedConcern
|
|
|
|
|
2019-03-18 13:00:55 -07: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 03:03:45 -07:00
|
|
|
def username_param
|
|
|
|
params[:username]
|
2019-03-18 13:00:55 -07:00
|
|
|
end
|
|
|
|
end
|