add credential check to config.js

This commit is contained in:
Arthur Lu 2022-12-20 15:15:08 -08:00
parent 0c66460bf7
commit f7a52a27d6

View File

@ -3,6 +3,11 @@ import {request, goToPage, getURIData} from "./utils.js";
window.addEventListener("DOMContentLoaded", init); window.addEventListener("DOMContentLoaded", init);
async function init () { async function init () {
let cookie = document.cookie;
if (cookie === "") {
goToPage("login.html");
}
let uriData = getURIData(); let uriData = getURIData();
let node = uriData.node; let node = uriData.node;
let type = uriData.type; let type = uriData.type;