diff --git a/frontend/src/app/components/api-docs/api-docs.component.html b/frontend/src/app/components/api-docs/api-docs.component.html index 29a8ab95d..70e80bfc7 100644 --- a/frontend/src/app/components/api-docs/api-docs.component.html +++ b/frontend/src/app/components/api-docs/api-docs.component.html @@ -44,7 +44,7 @@
Endpoint
- GET {{ baseNetworkUrl }}/api/currencies + GET {{ baseNetworkUrl }}/api/currencies
Description
diff --git a/frontend/src/app/components/api-docs/code-template.component.ts b/frontend/src/app/components/api-docs/code-template.component.ts index 40b207520..396a22b77 100644 --- a/frontend/src/app/components/api-docs/code-template.component.ts +++ b/frontend/src/app/components/api-docs/code-template.component.ts @@ -272,17 +272,23 @@ yarn add @mempool/liquid.js`; const indexNumber = index + 1; text = text.replace('%{' + indexNumber + '}', textReplace); } - if (this.network === 'main' || this.network === '') { - if (this.method === 'post') { - return `curl POST -sSLd ${text}`; + + if (this.env.BASE_MODULE === 'mempool') { + if (this.network === 'main' || this.network === '') { + if (this.method === 'post') { + return `curl POST -sSLd "${text}"`; + } + return `curl -sSL "${this.hostname}${text}"`; } - return `curl -sSL ${this.hostname}${text}`; + if (this.method === 'post') { + text = text.replace('/api', `/${this.network}/api`); + return `curl POST -sSLd "${text}"`; + } + return `curl -sSL "${this.hostname}/${this.network}${text}"`; } - if (this.method === 'post') { - text = text.replace('/api', `/${this.network}/api`); - return `curl POST -sSLd ${text}`; + if (this.env.BASE_MODULE !== 'mempool') { + return `curl -sSL "${this.hostname}${text}"`; } - return `curl -sSL ${this.hostname}/${this.network}${text}`; } }