mirror of
https://github.com/internetee/registry.git
synced 2025-06-03 19:27:29 +02:00
updated api response
This commit is contained in:
parent
ece988fca1
commit
cc07350551
2 changed files with 4 additions and 4 deletions
|
@ -8,8 +8,8 @@ module Api
|
|||
@contact = Contact.find_by(code: params[:id])
|
||||
|
||||
if @contact
|
||||
render json: { contact: Serializers::Repp::Contact.new(@contact,
|
||||
show_address: false).to_json },
|
||||
render json: { code: 1000, contact: Serializers::Repp::Contact.new(@contact,
|
||||
show_address: false).to_json },
|
||||
status: :found
|
||||
else
|
||||
render json: { errors: 'Contact not found' }, status: :not_found
|
||||
|
|
|
@ -8,8 +8,8 @@ module Api
|
|||
@domain = Domain.find_by(name: params[:name])
|
||||
|
||||
if @domain
|
||||
render json: { domain: Serializers::Repp::Domain.new(@domain,
|
||||
sponsored: true).to_json },
|
||||
render json: { code: 1000, domain: Serializers::Repp::Domain.new(@domain,
|
||||
sponsored: true).to_json },
|
||||
status: :found
|
||||
else
|
||||
render json: { errors: 'Domain not found' }, status: :not_found
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue