mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-26 15:58:44 +01:00
add avatars as well
This commit is contained in:
parent
87b98e0ad2
commit
e78f0943d0
1 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue