mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 16:37:52 +01:00
add stuff
This commit is contained in:
parent
da5602db8d
commit
d7c2694d37
1 changed files with 13 additions and 4 deletions
|
@ -50,14 +50,23 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/avatars/:v", async function (req, res) {
|
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())}`, {
|
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
|
||||||
method: req.method,
|
method: req.method,
|
||||||
});
|
});
|
||||||
|
|
||||||
f.body.pipe(res);
|
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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue