From aaa0b92e96c78e2c6716940b85ee0b75fbe88bb6 Mon Sep 17 00:00:00 2001 From: Ashley Date: Tue, 21 Mar 2023 19:00:22 +0000 Subject: [PATCH] update api url :3 --- src/libpoketube/init/pages-404-and-main.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libpoketube/init/pages-404-and-main.js b/src/libpoketube/init/pages-404-and-main.js index 669bfba8..f33f3d08 100644 --- a/src/libpoketube/init/pages-404-and-main.js +++ b/src/libpoketube/init/pages-404-and-main.js @@ -30,10 +30,7 @@ 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) { tab = `/?type=${capitalizeFirstLetter(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,