diff --git a/libs/badge-list.ts b/libs/badge-list.ts index 76875b67..1b2de519 100644 --- a/libs/badge-list.ts +++ b/libs/badge-list.ts @@ -48,7 +48,6 @@ export const liveBadgeList = [ 'mastodon', 'tidelift', 'jenkins', - 'liberapay', ] export async function loadBadgeMeta() { diff --git a/libs/badge-list2.ts b/libs/badge-list2.ts index d69f3c40..84b1cb1d 100644 --- a/libs/badge-list2.ts +++ b/libs/badge-list2.ts @@ -26,6 +26,7 @@ import matrix from '../pages/api/matrix' import runkit from '../pages/api/runkit' import winget from '../pages/api/winget' import xo from '../pages/api/xo' +import liberapay from 'pages/api/liberapay' export default { static: staticBadge.meta, @@ -55,5 +56,6 @@ export default { discord: discord.meta, matrix: matrix.meta, runkit: runkit.meta, - xo: xo.meta + xo: xo.meta, + liberapay: liberapay.meta, } diff --git a/next.config.js b/next.config.js index 81bc50b9..8e4b7b2a 100644 --- a/next.config.js +++ b/next.config.js @@ -58,6 +58,8 @@ const nextConfig = { '/matrix', '/runkit', '/peertube', + // utilities + '/liberapay', // discontinued '/apm', '/lgtm', diff --git a/api-legacy/liberapay.ts b/pages/api/liberapay.ts similarity index 88% rename from api-legacy/liberapay.ts rename to pages/api/liberapay.ts index 99f7e68b..9e5b8a81 100644 --- a/api-legacy/liberapay.ts +++ b/pages/api/liberapay.ts @@ -1,5 +1,5 @@ -import got from '../libs/got' -import { createBadgenHandler, PathArgs } from '../libs/create-badgen-handler' +import got from '../../libs/got' +import { createBadgenHandler, PathArgs } from '../../libs/create-badgen-handler-next' export default createBadgenHandler({ title: 'Liberapay', @@ -61,5 +61,11 @@ async function handler ({ topic, slug }: PathArgs) { status: goal, color: goal !== 'not set' ? 'yellow' : 'grey' } + default: + return { + subject: 'liberapay', + status: 'unknown', + color: 'grey' + } } }