fold sysinfo into network
the backends are network backends
This commit is contained in:
@@ -21,8 +21,6 @@ exports = module.exports = {
|
||||
updateDashboardDomain,
|
||||
prepareDashboardDomain,
|
||||
renewCerts,
|
||||
getServerIpv4,
|
||||
getServerIpv6,
|
||||
getLanguages,
|
||||
syncDnsRecords,
|
||||
getSystemGraphs,
|
||||
@@ -43,7 +41,6 @@ const assert = require('assert'),
|
||||
platform = require('../platform.js'),
|
||||
safe = require('safetydance'),
|
||||
speakeasy = require('speakeasy'),
|
||||
sysinfo = require('../sysinfo.js'),
|
||||
system = require('../system.js'),
|
||||
tokens = require('../tokens.js'),
|
||||
translation = require('../translation.js'),
|
||||
@@ -309,20 +306,6 @@ async function renewCerts(req, res, next) {
|
||||
next(new HttpSuccess(202, { taskId }));
|
||||
}
|
||||
|
||||
async function getServerIpv4(req, res, next) {
|
||||
const [error, ipv4] = await safe(sysinfo.getServerIPv4());
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, { ipv4 }));
|
||||
}
|
||||
|
||||
async function getServerIpv6(req, res, next) {
|
||||
const [error, ipv6] = await safe(sysinfo.getServerIPv6()); // ignore any error
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, { ipv6 }));
|
||||
}
|
||||
|
||||
async function getLanguages(req, res, next) {
|
||||
const [error, languages] = await safe(translation.getLanguages());
|
||||
if (error) return next(new BoxError.toHttpError(error));
|
||||
|
||||
Reference in New Issue
Block a user