mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 22:37:56 +01:00
remove channelfirstvideoobject :3
This commit is contained in:
parent
e5ec4e6679
commit
dae6282b85
1 changed files with 1 additions and 14 deletions
|
@ -314,23 +314,10 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let ChannelFirstVideoObject;
|
let ChannelFirstVideoObject = {
|
||||||
|
|
||||||
const source = [tj, shorts, stream].find(
|
|
||||||
(i) => i && i.videos && i.videos.length > 0
|
|
||||||
);
|
|
||||||
if (source) {
|
|
||||||
ChannelFirstVideoObject = await fetch(
|
|
||||||
`${config.invapi}/videos/${source.videos[0].videoId}`
|
|
||||||
)
|
|
||||||
.then((res) => res.text())
|
|
||||||
.then((txt) => JSON.parse(txt));
|
|
||||||
} else {
|
|
||||||
ChannelFirstVideoObject = {
|
|
||||||
subCountText: "0",
|
subCountText: "0",
|
||||||
authorVerified: false,
|
authorVerified: false,
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
renderTemplate(res, req, "channel.ejs", {
|
renderTemplate(res, req, "channel.ejs", {
|
||||||
ID,
|
ID,
|
||||||
|
|
Loading…
Reference in a new issue