From b1055a7cd6f779b7762bbc93a79a1bf678fc2e7e Mon Sep 17 00:00:00 2001 From: Amio Date: Sun, 2 Jun 2019 16:22:04 +0800 Subject: [PATCH] Cleanup codes --- endpoints/docs.ts | 2 +- endpoints/github.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/endpoints/docs.ts b/endpoints/docs.ts index 7f2b1c7..24966eb 100644 --- a/endpoints/docs.ts +++ b/endpoints/docs.ts @@ -4,7 +4,7 @@ import genHelp from '../libs/gen-help' // Handles `/docs/:name` export default async function (req, res) { - const [ , topic, name ] = req.url.split('/') + const [ , , name ] = req.url.split('/') const helpMarkdown = genHelp(name) if (helpMarkdown) { diff --git a/endpoints/github.ts b/endpoints/github.ts index 1d4022f..b9a1a1d 100644 --- a/endpoints/github.ts +++ b/endpoints/github.ts @@ -153,7 +153,7 @@ async function release ({ owner, repo, channel }: Args) { default: return { subject: 'release', - status: version(latest ? latest.name || latest.tag_name : null), + status: version(latest.name || latest.tag_name), color: latest.prerelease ? 'orange' : 'blue' } }