Merge pull request #800 from mempool/simon/api-docs-hostname-fix

Always use local hostname for API examples.
This commit is contained in:
wiz 2021-09-19 18:36:10 +09:00 committed by GitHub
commit 50c5244abf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 14 deletions

View File

@ -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>

View File

@ -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();