From 10bf9b3d30b97fcb73ab547d6f7629abf50ae799 Mon Sep 17 00:00:00 2001 From: jheaps Date: Fri, 19 Sep 2025 16:09:47 -0600 Subject: [PATCH] Bring debug.js back (I don't remember killing it) --- JoshHeaps.Net/wwwroot/js/Debug/debug.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 JoshHeaps.Net/wwwroot/js/Debug/debug.js diff --git a/JoshHeaps.Net/wwwroot/js/Debug/debug.js b/JoshHeaps.Net/wwwroot/js/Debug/debug.js new file mode 100644 index 0000000..13e2c18 --- /dev/null +++ b/JoshHeaps.Net/wwwroot/js/Debug/debug.js @@ -0,0 +1,16 @@ +document.addEventListener('DOMContentLoaded', () => { + getIpStatus(); +}); + +async function getIpStatus() { + try { + const res = await fetch(`/api/debug/IpCheck`); + if (!res.ok) throw new Error("API failed"); + + const text = await res.text(); + console.log(text); + document.querySelector('#IsIpChecking').textContent = text; + } catch (err) { + console.error("Error in api:", err); + } +} \ No newline at end of file