mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 07:58:28 +01:00
update api url :3
This commit is contained in:
parent
98fa6182bc
commit
aaa0b92e96
1 changed files with 2 additions and 6 deletions
|
@ -30,9 +30,6 @@ function getJson(str) {
|
|||
|
||||
module.exports = function (app, config, renderTemplate) {
|
||||
app.get("/discover", async function (req, res) {
|
||||
const trends = await modules.fetch(`${config.tubeApi}trending`);
|
||||
const h = await trends.text();
|
||||
const k = getJson(modules.toJson(h));
|
||||
|
||||
let tab = "";
|
||||
if (req.query.tab) {
|
||||
|
@ -46,13 +43,12 @@ module.exports = function (app, config, renderTemplate) {
|
|||
if (req.query.mobilesearch) {
|
||||
const query = req.query.mobilesearch;
|
||||
const continuation = req.query.continuation || "";
|
||||
const search = await modules.fetch(`https://tube-srv.ashley143.gay/api/search?query=${query}&continuation=${continuation}`);
|
||||
const search = await modules.fetch(`https://inner-api.poketube.fun/api/search?query=${query}&continuation=${continuation}`);
|
||||
const text = await search.text();
|
||||
j = getJson(modules.toJson(text));
|
||||
}
|
||||
|
||||
renderTemplate(res, req, "main.ejs", {
|
||||
k,
|
||||
tab: req.query.tab,
|
||||
isMobile: req.useragent.isMobile,
|
||||
mobilesearch: req.query.mobilesearch,
|
||||
|
|
Loading…
Reference in a new issue