mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Story #108553816 - fix exception with find_by
This commit is contained in:
parent
d55dd527e6
commit
86a54d8d25
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ module Repp
|
||||||
# example: curl -u registrar1:password localhost:3000/repp/v1/domains/1/transfer_info -H "Auth-Code: authinfopw1"
|
# example: curl -u registrar1:password localhost:3000/repp/v1/domains/1/transfer_info -H "Auth-Code: authinfopw1"
|
||||||
get '/:id/transfer_info', requirements: { id: /.*/ } do
|
get '/:id/transfer_info', requirements: { id: /.*/ } do
|
||||||
ident = params[:id]
|
ident = params[:id]
|
||||||
domain = ident =~ /\A[0-9]+\z/ ? Domain.find(ident) : Domain.find_by_idn(ident)
|
domain = ident =~ /\A[0-9]+\z/ ? Domain.find_by(id: ident) : Domain.find_by_idn(ident)
|
||||||
|
|
||||||
error! I18n.t('errors.messages.epp_domain_not_found'), 404 unless domain
|
error! I18n.t('errors.messages.epp_domain_not_found'), 404 unless domain
|
||||||
error! I18n.t('errors.messages.epp_authorization_error'), 401 unless domain.auth_info.eql? request.headers['Auth-Code']
|
error! I18n.t('errors.messages.epp_authorization_error'), 401 unless domain.auth_info.eql? request.headers['Auth-Code']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue