Docs root network support

This commit is contained in:
softsimon
2024-06-28 11:28:41 +09:00
parent d91c6bceed
commit ea04ea0048
2 changed files with 7 additions and 3 deletions

View File

@@ -72,7 +72,7 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
this.auditEnabled = this.env.AUDIT;
this.network$ = merge(of(''), this.stateService.networkChanged$).pipe(
tap((network: string) => {
if (this.env.BASE_MODULE === 'mempool' && network !== '') {
if (this.env.BASE_MODULE === 'mempool' && network !== '' && this.env.ROOT_NETWORK === '') {
this.baseNetworkUrl = `/${network}`;
} else if (this.env.BASE_MODULE === 'liquid') {
if (!['', 'liquid'].includes(network)) {
@@ -195,6 +195,10 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
}
}
if (network === this.env.ROOT_NETWORK) {
curlNetwork = '';
}
let text = code.codeTemplate.curl;
for (let index = 0; index < curlResponse.length; index++) {
const curlText = curlResponse[index];