mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 10:21:52 +01:00
Merge pull request #800 from mempool/simon/api-docs-hostname-fix
Always use local hostname for API examples.
This commit is contained in:
commit
50c5244abf
@ -698,7 +698,7 @@
|
||||
</ng-template>
|
||||
<ng-template ngbPanelContent>
|
||||
<div class="endpoint">
|
||||
<a [href]="wrapUrl(network.val, code.mempoolRecent)" target="_blank">GET {{ baseNetworkUrl }}/api/tx/:txid</a>
|
||||
<a [href]="wrapUrl(network.val, code.transaction)" target="_blank">GET {{ baseNetworkUrl }}/api/tx/:txid</a>
|
||||
</div>
|
||||
<div class="description">
|
||||
<div class="subtitle" i18n>Description</div>
|
||||
|
@ -40,18 +40,6 @@ export class ApiDocsComponent implements OnInit {
|
||||
|
||||
this.hostname = `${document.location.protocol}//${this.hostname}`;
|
||||
|
||||
if (document.location.hostname === 'localhost') {
|
||||
if (this.env.BASE_MODULE === 'bisq') {
|
||||
this.hostname = `https://bisq.markets`;
|
||||
}
|
||||
if (this.env.BASE_MODULE === 'liquid') {
|
||||
this.hostname = `https://liquid.network`;
|
||||
}
|
||||
if (this.env.BASE_MODULE === 'mempool') {
|
||||
this.hostname = `https://mempool.space`;
|
||||
}
|
||||
}
|
||||
|
||||
this.code = {
|
||||
address: {
|
||||
codeTemplate: {
|
||||
@ -2063,7 +2051,7 @@ export class ApiDocsComponent implements OnInit {
|
||||
},
|
||||
transactionCpfp: {
|
||||
codeTemplate: {
|
||||
curl: `/api/fees/cpfp/%{1}`,
|
||||
curl: `/api/v1/cpfp/%{1}`,
|
||||
commonJS: `
|
||||
const { %{0}: { fees } } = mempoolJS();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user