1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 04:34:38 -05:00

from da web to searches!!!

This commit is contained in:
Ashley 2022-10-20 17:22:48 +02:00
parent d8cf389c2e
commit bd18ae3c3c

View file

@ -431,10 +431,15 @@ app.get("/search", async (req, res) => {
return res.redirect("/"); return res.redirect("/");
} }
const summary = await wiki
.summary(query + "")
.then((summary_) => (summary_.title !== "Not found." ? summary_ : "none"));
renderTemplate(res, req, "search.ejs", { renderTemplate(res, req, "search.ejs", {
j, j,
continuation, continuation,
q: query, q: query,
summary
}); });
}); });