make sysinfo provider a setting
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
exports = module.exports = {
|
||||
getPublicIp: getPublicIp
|
||||
getServerIp: getServerIp
|
||||
};
|
||||
|
||||
var assert = require('assert'),
|
||||
@@ -9,7 +9,8 @@ var assert = require('assert'),
|
||||
BoxError = require('../boxerror.js'),
|
||||
superagent = require('superagent');
|
||||
|
||||
function getPublicIp(callback) {
|
||||
function getServerIp(config, callback) {
|
||||
assert.strictEqual(typeof config, 'object');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
if (process.env.BOX_ENV === 'test') return callback(null, '127.0.0.1');
|
||||
|
||||
Reference in New Issue
Block a user