Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getDiskInfo(cb) {
let dfs = {};
df.file(config.serverRoot).then((data) => {
delete data.mountpoint;
dfs.serverRoot = data;
return df.file(config.logsRoot);
}).then((data) => {
delete data.mountpoint;
dfs.logsRoot = data;
cb(null, dfs);
}).catch(cb);
}
df.file(config.serverRoot).then((data) => {
delete data.mountpoint;
dfs.serverRoot = data;
return df.file(config.logsRoot);
}).then((data) => {
delete data.mountpoint;