add stuff

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

View file

@ -49,15 +49,24 @@ module.exports = function (app, config, renderTemplate) {
});
app.get("/avatars/:v", async function (req, res) {
var url = `https://yt3.ggpht.com/${req.params.v}`
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
app.get("/avatars/:v", async function (req, res) {
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);
});