1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 04:34:38 -05:00

add avatars as well

This commit is contained in:
Ashley 2023-11-07 15:04:56 +00:00
parent 87b98e0ad2
commit e78f0943d0

View file

@ -48,6 +48,18 @@ module.exports = function (app, config, renderTemplate) {
f.body.pipe(res);
});
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("/api/search", async (req, res) => {
const query = req.query.query;