From fa52034fb7ab126e4f7e6b8b7dad0dfadb894328 Mon Sep 17 00:00:00 2001 From: sky Date: Mon, 30 Jun 2025 03:19:11 -0400 Subject: [PATCH] fix stuff after moving to resources --- accounts/profile.js | 4 ++-- index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/accounts/profile.js b/accounts/profile.js index 69c4c78..e06f5a7 100755 --- a/accounts/profile.js +++ b/accounts/profile.js @@ -37,8 +37,8 @@ let rawProfileHTML = fs.readFileSync("./html/profile.html").toString(); let rawEditProfileHTML = fs.readFileSync("./html/profile_edit.html").toString(); let profile404 = fs.readFileSync("./html/profile_404.html").toString(); let profileBan = fs.readFileSync("./html/profile_ban.html").toString(); -let gamesJSON = JSON.parse(fs.readFileSync("./selenite/data/games.json").toString()); -let appsJSON = JSON.parse(fs.readFileSync("./selenite/data/apps.json").toString()); +let gamesJSON = JSON.parse(fs.readFileSync("./public/resources/games.json").toString()); +let appsJSON = JSON.parse(fs.readFileSync("./public/resources/apps.json").toString()); let profileReadyJSON = {}; for (let i = 0; i < gamesJSON.length; i++) { profileReadyJSON[gamesJSON[i].directory] = { name: gamesJSON[i].name, image: gamesJSON[i].image }; diff --git a/index.js b/index.js index 4a7eab2..10a42c1 100755 --- a/index.js +++ b/index.js @@ -387,7 +387,7 @@ app.use("/ai", async (req, res, next) => { next(); } }); -app.use("/", express.static("./selenite", { extensions: ["html"] })); +app.use("/", express.static("./public", { extensions: ["html"] })); app.use("/data/:id/:file", async (req, res) => { const id = path.basename(req.params.id); const file = path.basename(req.params.file); @@ -490,6 +490,6 @@ server.on("upgrade", (request, socket, head) => { app.use(async (req, res) => { res .type("text/html") - .send(await fs.readFile(`./selenite/404.html`)) + .send(await fs.readFile(`./public/404.html`)) .status(404); });