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