feat: migrate /liberapay (#672)

user-agent
Amio Jin 2024-07-09 13:47:30 +08:00 zatwierdzone przez GitHub
rodzic c0f8ac219a
commit b58e0de176
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
4 zmienionych plików z 13 dodań i 4 usunięć

Wyświetl plik

@ -48,7 +48,6 @@ export const liveBadgeList = [
'mastodon',
'tidelift',
'jenkins',
'liberapay',
]
export async function loadBadgeMeta() {

Wyświetl plik

@ -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,
}

Wyświetl plik

@ -58,6 +58,8 @@ const nextConfig = {
'/matrix',
'/runkit',
'/peertube',
// utilities
'/liberapay',
// discontinued
'/apm',
'/lgtm',

Wyświetl plik

@ -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'
}
}
}