Reverting breaking change to `getVersion()`

pull/363/head
Jorge Caballero (DataDrivenMD) 2023-03-08 10:31:45 -08:00
rodzic 4a698bda0e
commit 79c3b61c81
2 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -4,3 +4,7 @@ import * as packagejson from '../package.json'
export const MASTODON_API_VERSION = '4.0.2'
export const WILDEBEEST_VERSION = packagejson.version
export function getVersion(): string {
return `${MASTODON_API_VERSION} (compatible; Wildebeest ${WILDEBEEST_VERSION})`
}

Wyświetl plik

@ -2,7 +2,7 @@ import type { Env } from 'wildebeest/backend/src/types/env'
import { cors } from 'wildebeest/backend/src/utils/cors'
import { DEFAULT_THUMBNAIL } from 'wildebeest/backend/src/config'
import type { InstanceConfigV2 } from 'wildebeest/backend/src/types/configs'
import { getFederationUA } from 'wildebeest/config/ua'
import { getVersion } from 'wildebeest/config/versions'
import { type Database, getDatabase } from 'wildebeest/backend/src/database'
export const onRequest: PagesFunction<Env, any> = async ({ env, request }) => {
@ -19,7 +19,7 @@ export async function handleRequest(domain: string, db: Database, env: Env) {
const res: InstanceConfigV2 = {
domain,
title: env.INSTANCE_TITLE,
version: getFederationUA(domain),
version: getVersion(),
source_url: 'https://github.com/cloudflare/wildebeest',
description: env.INSTANCE_DESCR,
thumbnail: {