mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-17 06:34:40 -05:00
more stuff
This commit is contained in:
parent
bb1e8234dd
commit
696bed8f51
1 changed files with 2 additions and 3 deletions
|
@ -81,7 +81,6 @@ app.get("/", function (req, res) {
|
||||||
app.get("/channel", async (req, res) => {
|
app.get("/channel", async (req, res) => {
|
||||||
const ID = req.query.id;
|
const ID = req.query.id;
|
||||||
const { toJson } = require("xml2json");
|
const { toJson } = require("xml2json");
|
||||||
|
|
||||||
const bout = await fetch(
|
const bout = await fetch(
|
||||||
`https://lighttube.herokuapp.com/api/channel?id=${ID}&tab=about`
|
`https://lighttube.herokuapp.com/api/channel?id=${ID}&tab=about`
|
||||||
);
|
);
|
||||||
|
@ -92,7 +91,8 @@ app.get("/channel", async (req, res) => {
|
||||||
ID:ID,
|
ID:ID,
|
||||||
j:k,
|
j:k,
|
||||||
about:k.Channel.Contents.ItemSection.About,
|
about:k.Channel.Contents.ItemSection.About,
|
||||||
subs:typeof subscribers === 'string' ? subscribers.replace('subscribers', '') : 'Private'
|
subs:typeof subscribers === 'string' ? subscribers.replace('subscribers', '') : 'Private',
|
||||||
|
desc:k.Channel.Contents.ItemSection.About.Description
|
||||||
});});
|
});});
|
||||||
app.get("/privacy", function (req, res) {
|
app.get("/privacy", function (req, res) {
|
||||||
renderTemplate(res, req, "priv.ejs");
|
renderTemplate(res, req, "priv.ejs");
|
||||||
|
@ -117,7 +117,6 @@ app.get("/search", async (req, res) => {
|
||||||
const search = await fetch(
|
const search = await fetch(
|
||||||
`https://lighttube.herokuapp.com/api/search?query=${query}`
|
`https://lighttube.herokuapp.com/api/search?query=${query}`
|
||||||
);
|
);
|
||||||
|
|
||||||
const text = await search.text();
|
const text = await search.text();
|
||||||
const j = JSON.parse(toJson(text));
|
const j = JSON.parse(toJson(text));
|
||||||
if (!query) {
|
if (!query) {
|
||||||
|
|
Loading…
Reference in a new issue