pass IP in query parameter

This commit is contained in:
Girish Ramakrishnan
2017-04-17 21:14:13 -07:00
parent 6bc764090c
commit 19d8b90a12
+1 -1
View File
@@ -294,7 +294,7 @@ function setTimeZone(ip, callback) {
debug('setTimeZone ip:%s', ip);
superagent.get('https://geolocation.cloudron.io/json').timeout(10 * 1000).end(function (error, result) {
superagent.get('https://geolocation.cloudron.io/json').query({ ip: ip }).timeout(10 * 1000).end(function (error, result) {
if ((error && !error.response) || result.statusCode !== 200) {
debug('Failed to get geo location: %s', error.message);
return callback(null);