mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
20 lines
495 B
Ruby
20 lines
495 B
Ruby
require 'rails5_api_controller_backport'
|
|
require 'auth_token/auth_token_decryptor'
|
|
|
|
module Api
|
|
module V1
|
|
module Registrant
|
|
class DomainsController < BaseController
|
|
def index
|
|
registrant = ::Registrant.find_by(ident: current_user.registrant_ident)
|
|
if registrant
|
|
domains = Domain.where(registrant_id: registrant.id)
|
|
render json: domains
|
|
else
|
|
render json: []
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|