mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-01 09:47:22 +01:00
add query
This commit is contained in:
parent
fc0fe67636
commit
a9cc30b997
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,6 @@ app.get("/api/search", async (req, res) => {
|
||||||
return res.redirect("/");
|
return res.redirect("/");
|
||||||
}
|
}
|
||||||
return res.redirect(`/search?query=${query}`);
|
return res.redirect(`/search?query=${query}`);
|
||||||
|
|
||||||
});
|
});
|
||||||
app.get("/search", async (req, res) => {
|
app.get("/search", async (req, res) => {
|
||||||
const { toJson } = require("xml2json");
|
const { toJson } = require("xml2json");
|
||||||
|
@ -114,6 +113,7 @@ app.get("/search", async (req, res) => {
|
||||||
}
|
}
|
||||||
renderTemplate(res, req, "search.ejs", {
|
renderTemplate(res, req, "search.ejs", {
|
||||||
j: j,
|
j: j,
|
||||||
|
q:query
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
app.get("/css/:id", (req, res) => {
|
app.get("/css/:id", (req, res) => {
|
||||||
|
|
Loading…
Reference in a new issue