Adding translators to About page

This commit is contained in:
softsimon
2022-01-13 03:58:12 +04:00
parent 5d15e2103d
commit a7528e60a8
5 changed files with 42 additions and 2 deletions

View File

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