This commit is contained in:
Martin Lensment 2015-01-07 16:36:07 +02:00
parent 14187b76f1
commit 4af3e80087
3 changed files with 20 additions and 11 deletions

View file

@ -2,7 +2,6 @@ module Repp
class API < Grape::API
format :json
prefix :repp
version 'v1', using: :path
http_basic do |username, password|
@current_user ||= EppUser.find_by(username: username, password: password)
@ -12,15 +11,6 @@ module Repp
attr_reader :current_user
end
resource :domains do
desc 'Return list of domains'
get '/' do
domains = current_user.registrar.domains.page(params[:page])
{
domains: domains,
total_pages: domains.total_pages
}
end
end
mount Repp::DomainV1
end
end