mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 22:57:54 +01:00
from da web to searches!!!
This commit is contained in:
parent
d8cf389c2e
commit
bd18ae3c3c
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue