mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-13 03:38:08 +01:00
hashtags!
This commit is contained in:
parent
3a1b1c827c
commit
8fbc2c308f
1 changed files with 18 additions and 0 deletions
18
server.js
18
server.js
|
@ -592,6 +592,16 @@ app.get("/api/subtitles", async (req, res) => {
|
||||||
res.send(body);
|
res.send(body);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.get("/api/redirect", async (req, res) => {
|
||||||
|
const red_url = req.query.u;
|
||||||
|
|
||||||
|
if (!red_url) {
|
||||||
|
res.redirect("/");
|
||||||
|
}
|
||||||
|
|
||||||
|
res.redirect(red_url);
|
||||||
|
});
|
||||||
|
|
||||||
app.get("/api/opensearch", async (req, res) => {
|
app.get("/api/opensearch", async (req, res) => {
|
||||||
res.sendFile(__dirname + `/opensearch.xml`);
|
res.sendFile(__dirname + `/opensearch.xml`);
|
||||||
});
|
});
|
||||||
|
@ -606,6 +616,14 @@ app.get("/discover", async function (req, res) {
|
||||||
res.redirect("/");
|
res.redirect("/");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.get("/hashtag/:id", (req, res) => {
|
||||||
|
if (!req.params.id) {
|
||||||
|
return res.redirect("/");
|
||||||
|
}
|
||||||
|
|
||||||
|
return res.redirect(`/search?query=${req.params.id}&from=hashtag`);
|
||||||
|
});
|
||||||
|
|
||||||
app.get("/video/upload", (req, res) => {
|
app.get("/video/upload", (req, res) => {
|
||||||
res.redirect("https://youtube.com/upload");
|
res.redirect("https://youtube.com/upload");
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue