From d097ee321937016b7cac005ae2ff03232d7d1da3 Mon Sep 17 00:00:00 2001 From: Ashley Date: Wed, 29 Nov 2023 19:22:11 +0000 Subject: [PATCH] fix my skill issue --- src/libpoketube/init/pages-api.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libpoketube/init/pages-api.js b/src/libpoketube/init/pages-api.js index a68e4f45..61dc8875 100644 --- a/src/libpoketube/init/pages-api.js +++ b/src/libpoketube/init/pages-api.js @@ -88,12 +88,14 @@ module.exports = function (app, config, renderTemplate) { }); app.get("/avatars/ytc/:v", async function (req, res) { +const { fetch } = await import("undici"); + var url = `https://invid-api.poketube.fun/ggpht/ytc/${req.params.v.replace( "ytc", "" )}`; - let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, { + let f = await fetch(url + `?cachefixer=${btoa(Date.now())}`, { method: req.method, });