mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 11:58:14 +01:00
add /shorts
This commit is contained in:
parent
2ad2aa51ff
commit
e006667ed4
1 changed files with 28 additions and 13 deletions
|
@ -1,4 +1,13 @@
|
||||||
const { fetcher,core, wiki,musicInfo, modules, version, initlog, init,} = require("../libpoketube-initsys.js");
|
const {
|
||||||
|
fetcher,
|
||||||
|
core,
|
||||||
|
wiki,
|
||||||
|
musicInfo,
|
||||||
|
modules,
|
||||||
|
version,
|
||||||
|
initlog,
|
||||||
|
init,
|
||||||
|
} = require("../libpoketube-initsys.js");
|
||||||
const {
|
const {
|
||||||
IsJsonString,
|
IsJsonString,
|
||||||
convert,
|
convert,
|
||||||
|
@ -11,18 +20,24 @@ const {
|
||||||
|
|
||||||
const sha384 = modules.hash;
|
const sha384 = modules.hash;
|
||||||
|
|
||||||
module.exports = function (app,config, renderTemplate) {
|
module.exports = function (app, config, renderTemplate) {
|
||||||
|
app.get("/hashtag/:id", (req, res) => {
|
||||||
|
if (!req.params.id) {
|
||||||
|
return res.redirect("/");
|
||||||
|
}
|
||||||
|
|
||||||
app.get("/hashtag/:id", (req, res) => {
|
return res.redirect(`/search?query=${req.params.id}&from=hashtag`);
|
||||||
if (!req.params.id) {
|
});
|
||||||
return res.redirect("/");
|
|
||||||
}
|
|
||||||
|
|
||||||
return res.redirect(`/search?query=${req.params.id}&from=hashtag`);
|
app.get("/shorts/:id", (req, res) => {
|
||||||
});
|
if (!req.params.id) {
|
||||||
|
return res.redirect("/");
|
||||||
|
}
|
||||||
|
|
||||||
app.get("/video/upload", (req, res) => {
|
return res.redirect(`/watch?v=${req.params.id}&from=short`);
|
||||||
res.redirect("https://youtube.com/upload");
|
});
|
||||||
});
|
|
||||||
}
|
app.get("/video/upload", (req, res) => {
|
||||||
|
res.redirect("https://youtube.com/upload");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in a new issue