add stuff

This commit is contained in:
Ashley 2023-11-07 16:00:57 +00:00
parent da5602db8d
commit d7c2694d37

View file

@ -50,14 +50,23 @@ module.exports = function (app, config, renderTemplate) {
});
app.get("/avatars/:v", async function (req, res) {
var url = `https://yt3.ggpht.com/${req.params.v}`
var url = `https://yt3.ggpht.com/${req.params.v}`;
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
method: req.method,
});
f.body.pipe(res);
});
app.get("/avatars/ytc/:v", async function (req, res) {
var url = `https://yt3.ggpht.com/ytc/${req.params.v.replace("ytc", "")}`;
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
method: req.method,
});
f.body.pipe(res);
});