Displaying translators as twitter photos

This commit is contained in:
softsimon committed 2022-01-15 04:19:50 +04:00
1 parent 85f471ad08
commit debcd1808e
2 files changed
+14 -3

No files matched your search

+10
View File
@@ -229,6 +229,16 @@ class Server {
res.status(500).end();
}
})
.get(config.MEMPOOL.API_URL_PREFIX + 'translators/images/:id', async (req, res) => {
try {
const response = await axios.get('https://mempool.space/api/v1/translators/images/' + req.params.id, {
responseType: 'stream', timeout: 10000
});
response.data.pipe(res);
} catch (e) {
res.status(500).end();
}
})
;
if (config.STATISTICS.ENABLED && config.DATABASE.ENABLED) {