mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-29 23:48:45 +01:00
new about section :3
This commit is contained in:
parent
8ccbe3e182
commit
97e6d472f0
1 changed files with 15 additions and 1 deletions
14
server.js
14
server.js
|
@ -430,6 +430,8 @@ app.get("/search", async (req, res) => {
|
|||
|
||||
app.get("/channel/", async (req, res) => {
|
||||
const ID = req.query.id;
|
||||
const tab = req.query.tab;
|
||||
|
||||
|
||||
|
||||
// about
|
||||
|
@ -442,11 +444,23 @@ app.get("/channel/", async (req, res) => {
|
|||
const c = await channel.text();
|
||||
const tj = JSON.parse(toJson(c));
|
||||
|
||||
const summary = await wiki.summary(k.Channel.Metadata.Name);
|
||||
|
||||
var w = "";
|
||||
if (summary.title === "Not found.") {
|
||||
w = "none";
|
||||
}
|
||||
if (summary.title !== "Not found.") {
|
||||
w = summary;
|
||||
}
|
||||
|
||||
const { Subscribers: subscribers } = k.Channel.Metadata;
|
||||
renderTemplate(res, req, "channel.ejs", {
|
||||
ID: ID,
|
||||
tab: tab,
|
||||
j: k,
|
||||
tj: tj,
|
||||
wiki: w,
|
||||
about: k.Channel.Contents.ItemSection.About,
|
||||
subs:
|
||||
typeof subscribers === "string"
|
||||
|
|
Loading…
Reference in a new issue