1
0
Fork 0

allow queries to go through index route

This commit is contained in:
grumbulon 2022-04-10 22:40:49 -04:00
parent 3becce1feb
commit 32443f13a8
1 changed files with 6 additions and 3 deletions

View File

@ -6,13 +6,16 @@ const port = 3000;
app.get("/", (req, res) => {
res.set("Cache-Control", "no-store");
getFromBooru();
if (!req.query.tags) {
getFromBooru();
} else {
const tags = req.query.tags.split(",");
userDefinedTags(tags);
}
res.sendFile("src/public/assets/waifu.png", { root: "." });
});
app.get("/waifu", (req, res) => {
const tags = req.query.tags.split(",");
userDefinedTags(tags);
res.sendFile("src/public/assets/waifu.png", { root: "." });
});