sysinfo: async'ify
in the process, provision, dyndns, mail, dns also got further asyncified
This commit is contained in:
@@ -14,16 +14,14 @@ exports = module.exports = {
|
||||
var assert = require('assert'),
|
||||
BoxError = require('../boxerror.js');
|
||||
|
||||
function getServerIp(config, callback) {
|
||||
async function getServerIp(config) {
|
||||
assert.strictEqual(typeof config, 'object');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
callback(new BoxError(BoxError.NOT_IMPLEMENTED, 'testConfig is not implemented'));
|
||||
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'testConfig is not implemented');
|
||||
}
|
||||
|
||||
function testConfig(config, callback) {
|
||||
async function testConfig(config) {
|
||||
assert.strictEqual(typeof config, 'object');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
callback(null);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user