Since 2016-10-15 a redirect to a signup page has been implemented.
This commit is contained in:
parent
dfdfb15d43
commit
f5de9086b7
1 changed files with 10 additions and 1 deletions
|
@ -23,7 +23,7 @@ class ImportZendeskController < ApplicationController
|
||||||
'Connection refused' => 'Connection refused!',
|
'Connection refused' => 'Connection refused!',
|
||||||
}
|
}
|
||||||
|
|
||||||
response = UserAgent.request( params[:url] )
|
response = UserAgent.request(params[:url])
|
||||||
|
|
||||||
if !response.success?
|
if !response.success?
|
||||||
message_human = ''
|
message_human = ''
|
||||||
|
@ -40,6 +40,15 @@ class ImportZendeskController < ApplicationController
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# since 2016-10-15 a redirect to a signup page has been implemented
|
||||||
|
if response.body =~ /(Take it for a risk-free|Take it for a risk-free)/i
|
||||||
|
render json: {
|
||||||
|
result: 'invalid',
|
||||||
|
message_human: 'Hostname not found!',
|
||||||
|
}
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
Setting.set('import_zendesk_endpoint', "#{params[:url]}api/v2")
|
Setting.set('import_zendesk_endpoint', "#{params[:url]}api/v2")
|
||||||
|
|
||||||
render json: {
|
render json: {
|
||||||
|
|
Loading…
Reference in a new issue