kopia lustrzana https://github.com/cloudflare/wildebeest
remove v2 instance endpoint
rodzic
2ad62887d2
commit
178a6dcb9b
|
@ -53,7 +53,6 @@ export async function main(context: EventContext<Env, any, any>) {
|
|||
url.pathname === '/oauth/token' ||
|
||||
url.pathname === '/oauth/authorize' || // Cloudflare Access runs on /oauth/authorize
|
||||
url.pathname === '/api/v1/instance' ||
|
||||
url.pathname === '/api/v2/instance' ||
|
||||
url.pathname === '/api/v1/apps' ||
|
||||
url.pathname === '/api/v1/timelines/public' ||
|
||||
url.pathname === '/api/v1/custom_emojis' ||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { strict as assert } from 'node:assert/strict'
|
||||
import * as v1_instance from 'wildebeest/functions/api/v1/instance'
|
||||
import * as v2_instance from 'wildebeest/functions/api/v2/instance'
|
||||
import * as apps from 'wildebeest/functions/api/v1/apps'
|
||||
import * as custom_emojis from 'wildebeest/functions/api/v1/custom_emojis'
|
||||
import * as notifications from 'wildebeest/functions/api/v1/notifications'
|
||||
|
@ -45,25 +44,6 @@ describe('Mastodon APIs', () => {
|
|||
}
|
||||
})
|
||||
|
||||
test('return the instance infos v2', async () => {
|
||||
const db = await makeDB()
|
||||
const data = {
|
||||
title: 'title',
|
||||
uri: 'uri',
|
||||
email: 'email',
|
||||
description: 'description',
|
||||
accessAud: '1',
|
||||
accessDomain: 'foo',
|
||||
}
|
||||
await configure(db, data)
|
||||
|
||||
const res = await v2_instance.handleRequest(domain, db)
|
||||
assert.equal(res.status, 200)
|
||||
assertCORS(res)
|
||||
assertJSON(res)
|
||||
assertCache(res, 180)
|
||||
})
|
||||
|
||||
test('adds a short_description if missing', async () => {
|
||||
const db = await makeDB()
|
||||
const data = {
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
// https://docs.joinmastodon.org/methods/instance/#v2
|
||||
|
||||
import * as v1_instance from 'wildebeest/functions/api/v1/instance'
|
||||
|
||||
export const onRequest = v1_instance.onRequest
|
||||
export const handleRequest = v1_instance.handleRequest
|
Ładowanie…
Reference in New Issue