added routes for hosts

This commit is contained in:
2019-12-12 13:33:54 -05:00
parent 7a05f6826f
commit 9bf224a8cb
3 changed files with 49 additions and 23 deletions

View File

@ -20,6 +20,22 @@ async function listAll(){
}
async function listAllDetail(){
try{
let out = [];
let hosts = await listAll();
for(let host of hosts){
out.push(await getInfo({host}));
}
return out
}catch(error){
return new Error(error);
}
}
async function add(data){
try{
@ -53,4 +69,4 @@ async function remove(data){
}
module.exports = {getInfo, listAll, add, remove};
module.exports = {getInfo, listAll, listAllDetail, add, remove};