hashtags!

This commit is contained in:
Ashley 2022-10-12 21:54:34 +02:00
parent 366136d2f0
commit f9a0b62176

View file

@ -592,6 +592,16 @@ app.get("/api/subtitles", async (req, res) => {
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) => {
res.sendFile(__dirname + `/opensearch.xml`);
});
@ -606,6 +616,14 @@ app.get("/discover", async function (req, res) {
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) => {
res.redirect("https://youtube.com/upload");
});