sysinfo: async'ify
in the process, provision, dyndns, mail, dns also got further asyncified
This commit is contained in:
@@ -297,12 +297,11 @@ async function syncExternalLdap(req, res, next) {
|
||||
next(new HttpSuccess(202, { taskId }));
|
||||
}
|
||||
|
||||
function getServerIp(req, res, next) {
|
||||
sysinfo.getServerIp(function (error, ip) {
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
async function getServerIp(req, res, next) {
|
||||
const [error, ip] = await safe(sysinfo.getServerIp());
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, { ip }));
|
||||
});
|
||||
next(new HttpSuccess(200, { ip }));
|
||||
}
|
||||
|
||||
async function getLanguages(req, res, next) {
|
||||
|
||||
Reference in New Issue
Block a user