From 8257a9312a2ee388427887117e5d222dd7826214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9D=E3=83=BC=E3=83=AB=20=E3=82=A6=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=96?= Date: Tue, 16 Apr 2019 14:52:51 -0500 Subject: [PATCH] Reversion and optimize --- app/views/api.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/views/api.js b/app/views/api.js index 15fadf4..2029263 100644 --- a/app/views/api.js +++ b/app/views/api.js @@ -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) { - /* -

${sectionTitle}

-

${sectionDescription}

-
- */ - return `

${sectionDetails.name}

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