From a5596afc4ce03dcc2272710dd37d302baf459ac3 Mon Sep 17 00:00:00 2001 From: ashley Date: Wed, 3 Jul 2024 08:49:11 +0000 Subject: [PATCH] add sugesstion api :3 --- src/libpoketube/init/pages-api.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/libpoketube/init/pages-api.js b/src/libpoketube/init/pages-api.js index 735de0a6..b48d9f02 100644 --- a/src/libpoketube/init/pages-api.js +++ b/src/libpoketube/init/pages-api.js @@ -193,6 +193,18 @@ app.use("/sb/i/:v/:imagePath/:img", async function (req, res) { f.body.pipe(res); }); + app.get("/api/improving-poke/getsugesstions", async (req, res) => { + const query = req.query.q; + + let url = `https://invid-api.poketube.fun/api/v1/search/suggestions?q=${id}`; + + let f = await modules.fetch(url, { + method: req.method, + }); + + f.body.pipe(res); + }); + app.get("/api/redirect", async (req, res) => { const red_url = atob(req.query.u);