fetch custom dash config from services

This commit is contained in:
Mononaut 2025-01-17 06:03:12 +00:00
parent 341da85c77
commit 601f0ea671
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E
2 changed files with 7 additions and 1 deletions

View File

@ -7,6 +7,7 @@ class ServicesRoutes {
public initRoutes(app: Application): void {
app
.get(config.MEMPOOL.API_URL_PREFIX + 'wallet/:walletId', this.$getWallet)
.get(config.MEMPOOL.API_URL_PREFIX + 'services/custom/config', this.$getCustomConfig)
;
}
@ -22,6 +23,11 @@ class ServicesRoutes {
handleError(req, res, 500, 'Failed to get wallet');
}
}
// serve a blank custom config file by default
private async $getCustomConfig(req: Request, res: Response): Promise<void> {
res.status(200).contentType('application/javascript').send('');
}
}
export default new ServicesRoutes();

View File

@ -5,7 +5,7 @@
<meta charset="utf-8">
<title>mempool - Bitcoin Explorer</title>
<script src="/resources/config.js"></script>
<script src="/resources/customize.js"></script>
<script src="/api/v1/services/custom/config"></script>
<base href="/">
<meta name="description" content="Explore the full Bitcoin ecosystem with The Mempool Open Source Project®. See the real-time status of your transactions, get network info, and more." />