mirror of
https://github.com/mempool/mempool.git
synced 2024-11-19 18:03:00 +01:00
Displaying translators as twitter photos
This commit is contained in:
parent
85f471ad08
commit
debcd1808e
@ -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) {
|
||||
|
@ -165,16 +165,17 @@
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="translators$ | async | keyvalue as translators else loadingSponsors">
|
||||
<div class="maintainers">
|
||||
<div class="community-sponsor">
|
||||
<h3 i18n="about.translators">Translators</h3>
|
||||
<div class="wrapper">
|
||||
<ng-template ngFor let-translator [ngForOf]="translators">
|
||||
<a [href]="'https://twitter.com/' + translator.value" target="_blank" [title]="translator.key">
|
||||
<span>{{ translator.value }}</span>
|
||||
</a>,
|
||||
<img class="image" [src]="'/api/v1/translators/images/' + translator.value" />
|
||||
</a>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="allContributors$ | async as contributors else loadingSponsors">
|
||||
|
Loading…
Reference in New Issue
Block a user