mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-01 11:07:26 +01:00
New feed
This commit is contained in:
parent
2f33ec80f6
commit
acaaae8759
1 changed files with 7 additions and 2 deletions
|
@ -190,7 +190,7 @@ app.get("/old/watch", async function (req, res) {
|
||||||
lyrics: lyrics.replace(/\n/g, " <br> "),
|
lyrics: lyrics.replace(/\n/g, " <br> "),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
app.get("/", async function (req, res) {
|
app.get("/feed/discover/trends", async function (req, res) {
|
||||||
const trends = await fetch(config.tubeApi + `trending`);
|
const trends = await fetch(config.tubeApi + `trending`);
|
||||||
const h = await trends.text();
|
const h = await trends.text();
|
||||||
const k = JSON.parse(toJson(h));
|
const k = JSON.parse(toJson(h));
|
||||||
|
@ -256,10 +256,15 @@ app.get("/search", async (req, res) => {
|
||||||
app.get("/css/:id", (req, res) => {
|
app.get("/css/:id", (req, res) => {
|
||||||
res.sendFile(__dirname + `/css/${req.params.id}`);
|
res.sendFile(__dirname + `/css/${req.params.id}`);
|
||||||
});
|
});
|
||||||
|
app.get("/js/:id", (req, res) => {
|
||||||
|
res.sendFile(__dirname + `/js/${req.params.id}`);
|
||||||
|
});
|
||||||
app.get("/video/upload", (req, res) => {
|
app.get("/video/upload", (req, res) => {
|
||||||
res.redirect("https://youtube.com/upload?from=poketube_utc");
|
res.redirect("https://youtube.com/upload?from=poketube_utc");
|
||||||
});
|
});
|
||||||
|
app.get("/", (req, res) => {
|
||||||
|
res.redirect("/feed/discover/trends?param=/");
|
||||||
|
});
|
||||||
app.get("/api/video/download", async function (req, res) {
|
app.get("/api/video/download", async function (req, res) {
|
||||||
var v = req.query.v;
|
var v = req.query.v;
|
||||||
var fetching = await fetcher(v);
|
var fetching = await fetcher(v);
|
||||||
|
|
Loading…
Reference in a new issue