From c90ba89488329b4a3e5eadebb5ca0b58676d3890 Mon Sep 17 00:00:00 2001 From: Amio Date: Fri, 31 May 2019 14:48:44 +0800 Subject: [PATCH] Fix crates badge route --- endpoints/crates.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/endpoints/crates.ts b/endpoints/crates.ts index b4c4397..5053c61 100644 --- a/endpoints/crates.ts +++ b/endpoints/crates.ts @@ -17,7 +17,7 @@ export const meta: Meta = { } export const handlers: Handlers = { - '/crates/:topic/:name': handler + '/crates/:topic/:pkg': handler } export default badgenServe(handlers) @@ -45,11 +45,5 @@ async function handler ({topic, pkg}: Args) { status: millify(crate.recent_downloads) + ' latest version', color: 'green' } - default: - return { - subject: 'crates', - status: 'unknown topic', - color: 'grey' - } } }