diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-04-03 23:35:14 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-04-03 23:35:14 +0900 |
| commit | eec1af1f52aa217e12e52c7c9d66f0106e66a200 (patch) | |
| tree | c89a99e6d289c411f1457743776a9d097c9e6554 /src/server/web/index.ts | |
| parent | APメンションはaudienceじゃなくてtagを参照するなど (#6128) (diff) | |
| download | sharkey-eec1af1f52aa217e12e52c7c9d66f0106e66a200.tar.gz sharkey-eec1af1f52aa217e12e52c7c9d66f0106e66a200.tar.bz2 sharkey-eec1af1f52aa217e12e52c7c9d66f0106e66a200.zip | |
Revert
Diffstat (limited to 'src/server/web/index.ts')
| -rw-r--r-- | src/server/web/index.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/server/web/index.ts b/src/server/web/index.ts index 55a2620ad5..3da86944d7 100644 --- a/src/server/web/index.ts +++ b/src/server/web/index.ts @@ -15,6 +15,7 @@ import * as MarkdownIt from 'markdown-it'; import packFeed from './feed'; import { fetchMeta } from '../../misc/fetch-meta'; +import { genOpenapiSpec } from '../api/openapi/gen-spec'; import config from '../../config'; import { Users, Notes, Emojis, UserProfiles, Pages } from '../../models'; import parseAcct from '../../misc/acct/parse'; @@ -96,15 +97,13 @@ router.get('/api-doc', async ctx => { }); }); -router.get('/api.json', async ctx => { - await send(ctx as any, '/assets/api.json', { - root: client - }); -}); - // URL preview endpoint router.get('/url', require('./url-preview')); +router.get('/api.json', async ctx => { + ctx.body = genOpenapiSpec(); +}); + router.get('/docs.json', async ctx => { const lang = ctx.query.lang; if (!Object.keys(locales).includes(lang)) { |