Reversion and optimize

This commit is contained in:
ポール ウェッブ 2019-04-16 14:52:51 -05:00
parent eca01709a5
commit 8257a9312a

View file

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