mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 18:56:05 +02:00
Merge pull request #722 from internetee/registry-693
REST API: Return successful domain transfers
This commit is contained in:
commit
7c45a85cea
7 changed files with 17 additions and 12 deletions
|
@ -51,11 +51,13 @@ class Registrar
|
|||
end
|
||||
end
|
||||
|
||||
if response.code == '204'
|
||||
flash[:notice] = t '.transferred'
|
||||
parsed_response = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
if response.code == '200'
|
||||
flash[:notice] = t '.transferred', count: parsed_response[:data].size
|
||||
redirect_to registrar_domains_url
|
||||
else
|
||||
@api_errors = JSON.parse(response.body, symbolize_names: true)[:errors]
|
||||
@api_errors = parsed_response[:errors]
|
||||
render :new
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue