diff --git a/libs/badge-list.ts b/libs/badge-list.ts index b0a5d7d..6adb26d 100644 --- a/libs/badge-list.ts +++ b/libs/badge-list.ts @@ -19,7 +19,6 @@ export const liveBadgeList = [ 'nuget', 'packagist', 'rubygems', - 'apm', 'vs-marketplace', 'melpa', 'maven', diff --git a/next.config.js b/next.config.js index 95520f2..84801ad 100644 --- a/next.config.js +++ b/next.config.js @@ -50,6 +50,8 @@ const nextConfig = { '/runkit', '/winget', '/xo', + // discontinued + '/apm', ] badgeApis.forEach(badge => { diff --git a/api-/apm.ts b/pages/api/apm.ts similarity index 57% rename from api-/apm.ts rename to pages/api/apm.ts index 008290c..e23a7e2 100644 --- a/api-/apm.ts +++ b/pages/api/apm.ts @@ -1,4 +1,4 @@ -import { createBadgenHandler } from '../libs/create-badgen-handler' +import { createBadgenHandler } from '../../libs/create-badgen-handler-next' const help = ` ## Discontinued @@ -8,10 +8,16 @@ Read all about GitHub [Sunsetting Atom](https://github.blog/2022-06-08-sunsettin export default createBadgenHandler({ title: 'Atom Package', - examples: {}, + examples: { + '/apm/v/linter': 'version', + '/apm/stars/linter': 'stars', + '/apm/license/linter': 'license', + '/apm/downloads/linter': 'downloads', + }, handlers: { '/apm/:topic/:pkg': handler - } + }, + help: help }) async function handler () { diff --git a/vercel.json b/vercel.json index 163b6a3..33be058 100644 --- a/vercel.json +++ b/vercel.json @@ -6,10 +6,6 @@ "source": "/amo/:match*", "destination": "https://v2022.badgen.net/amo/:match*" }, - { - "source": "/apm/:match*", - "destination": "https://v2022.badgen.net/apm/:match*" - }, { "source": "/appveyor/:match*", "destination": "https://v2022.badgen.net/appveyor/:match*"