From 737cf4301595fec8b68cab9a2bf57c40638c444e Mon Sep 17 00:00:00 2001 From: andrewstech Date: Mon, 10 Jul 2023 20:23:10 +0000 Subject: [PATCH] FIX --- components/web/listDomains.js | 7 ++++--- testweb.js | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 testweb.js diff --git a/components/web/listDomains.js b/components/web/listDomains.js index 6fea968..f1f7e84 100644 --- a/components/web/listDomains.js +++ b/components/web/listDomains.js @@ -1,6 +1,6 @@ -function ListDomains(username) { +async function ListDomains(username) { let results = []; - fetch("https://raw-api.is-a.dev") + await fetch("https://raw-api.is-a.dev") .then((response) => response.json()) .then(async (data) => { @@ -13,4 +13,5 @@ function ListDomains(username) { } }); return results; -} \ No newline at end of file +} +exports.ListDomains = ListDomains; \ No newline at end of file diff --git a/testweb.js b/testweb.js new file mode 100644 index 0000000..0ca0ff9 --- /dev/null +++ b/testweb.js @@ -0,0 +1,2 @@ +const keepAlive = require("./components/webserver.js"); +keepAlive(); \ No newline at end of file