mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-01 09:47:22 +01:00
Update server.js
This commit is contained in:
parent
1a13de138c
commit
864d6128a0
1 changed files with 1 additions and 10 deletions
11
server.js
11
server.js
|
@ -252,26 +252,17 @@ app.get("/search", async (req, res) => {
|
|||
q: query,
|
||||
});
|
||||
});
|
||||
|
||||
app.get("/css/:id", (req, res) => {
|
||||
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) => {
|
||||
res.redirect("https://youtube.com/upload?from=poketube_utc");
|
||||
});
|
||||
|
||||
app.get("/", async function (req, res) {
|
||||
const trends = await fetch(config.tubeApi + `trending`);
|
||||
const h = await trends.text();
|
||||
const k = JSON.parse(toJson(h));
|
||||
renderTemplate(res, req, "landing.ejs", {
|
||||
k: k,
|
||||
});
|
||||
res.redirect("/discover");
|
||||
});
|
||||
app.get("/api/video/download", async function (req, res) {
|
||||
var v = req.query.v;
|
||||
|
|
Loading…
Reference in a new issue