mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 22:54:47 +02:00
Make API return errors array
This commit is contained in:
parent
ed1afb78f6
commit
c1ea79615f
4 changed files with 5 additions and 5 deletions
|
@ -46,7 +46,7 @@ module Api
|
|||
allowed_ips = ENV['registrant_api_auth_allowed_ips'].to_s.split(',').map(&:strip)
|
||||
return if allowed_ips.include?(request.ip) || Rails.env.development?
|
||||
|
||||
render json: { error: 'Not authorized' }, status: :unauthorized
|
||||
render json: { errors: ['Not authorized'] }, status: :unauthorized
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue