Reversion and optimize
This commit is contained in:
parent
eca01709a5
commit
8257a9312a
1 changed files with 2 additions and 8 deletions
|
@ -15,7 +15,7 @@ import headerSdk from "~component/api/header-sdk";
|
|||
import redirects from "~data/redirects.json";
|
||||
|
||||
const blockchainApi = "https://cdn.jsdelivr.net/gh/lbryio/lbrycrd@master/contrib/devtools/generated/api_v1.json";
|
||||
const cacheBump = new Map();
|
||||
const cache = new Map();
|
||||
const sdkApi = "https://cdn.jsdelivr.net/gh/lbryio/lbry@master/docs/api.json";
|
||||
|
||||
|
||||
|
@ -182,12 +182,6 @@ function createSdkContent(apiDetails) {
|
|||
}
|
||||
|
||||
function createSdkContentSections(sectionTitle, sectionDescription, sectionDetails) {
|
||||
/*
|
||||
<h2 id="${sectionTitle}">${sectionTitle}</h2>
|
||||
<p>${sectionDescription}</p>
|
||||
<hr/>
|
||||
*/
|
||||
|
||||
return `
|
||||
<div class="api-content__body">
|
||||
<h2 id="${sectionDetails.name}">${sectionDetails.name}</h2>
|
||||
|
@ -245,7 +239,7 @@ async function parseApiFile(urlSlug) {
|
|||
if (!apiFileLink)
|
||||
return Promise.reject(new Error("Failed to fetch API docs"));
|
||||
|
||||
const response = await got(apiFileLink, { cache: cacheBump, json: true });
|
||||
const response = await got(apiFileLink, { cache, json: true });
|
||||
|
||||
try {
|
||||
return response.body;
|
||||
|
|
Loading…
Reference in a new issue