This commit is contained in:
bingus_violet 2024-06-08 18:31:34 -05:00
parent 2d1df01fcf
commit 5c0b892e22
3 changed files with 38 additions and 23 deletions

View file

@ -39,14 +39,10 @@ app.use("/cached", express.static(cachePath))
app.use("/imgs", express.static(path.join(assetPath, "Images")))
app.use("/snds", express.static(path.join(assetPath, "Sounds")))
app.use("/emojis", express.static(path.join(cachePath, "emojis")))
if (!fs.existsSync(cachePath)) {
fs.mkdirSync(cachePath)
} else {
var files = fs.readdirSync(cachePath)
for (let index = 0; index < files.length; index++) {
const file = files[index];
fs.rmSync(path.join(cachePath, file))
}
}
app.get("/discHTML", (req, res) => {