diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-04-24 15:23:48 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-04-24 15:23:48 +0900 |
| commit | 723d3e6871a6039330e870d94d187367e9c579aa (patch) | |
| tree | 637cbe640d99d6f0fc8890fdc85497a31817596f /src/server/api/endpoints/meta.ts | |
| parent | Merge branch 'develop' (diff) | |
| parent | 11.3.0 (diff) | |
| download | misskey-723d3e6871a6039330e870d94d187367e9c579aa.tar.gz misskey-723d3e6871a6039330e870d94d187367e9c579aa.tar.bz2 misskey-723d3e6871a6039330e870d94d187367e9c579aa.zip | |
Merge branch 'develop'
Diffstat (limited to 'src/server/api/endpoints/meta.ts')
| -rw-r--r-- | src/server/api/endpoints/meta.ts | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts index 785f21f22b..793eb5a204 100644 --- a/src/server/api/endpoints/meta.ts +++ b/src/server/api/endpoints/meta.ts @@ -2,9 +2,10 @@ import $ from 'cafy'; import * as os from 'os'; import config from '../../../config'; import define from '../define'; -import fetchMeta from '../../../misc/fetch-meta'; +import { fetchMeta } from '../../../misc/fetch-meta'; import * as pkg from '../../../../package.json'; import { Emojis } from '../../../models'; +import { types, bool } from '../../../misc/schema'; export const meta = { stability: 'stable', @@ -26,32 +27,40 @@ export const meta = { }, res: { - type: 'object', + type: types.object, + optional: bool.false, nullable: bool.false, properties: { version: { - type: 'string', + type: types.string, + optional: bool.false, nullable: bool.false, description: 'The version of Misskey of this instance.', example: pkg.version }, name: { - type: 'string', + type: types.string, + optional: bool.false, nullable: bool.false, description: 'The name of this instance.', }, description: { - type: 'string', + type: types.string, + optional: bool.false, nullable: bool.false, description: 'The description of this instance.', }, announcements: { - type: 'array', + type: types.array, + optional: bool.false, nullable: bool.false, items: { - type: 'object', + type: types.object, + optional: bool.false, nullable: bool.false, properties: { title: { - type: 'string', + type: types.string, + optional: bool.false, nullable: bool.false, description: 'The title of the announcement.', }, text: { - type: 'string', + type: types.string, + optional: bool.false, nullable: bool.false, description: 'The text of the announcement. (can be HTML)', }, } @@ -59,19 +68,23 @@ export const meta = { description: 'The announcements of this instance.', }, disableRegistration: { - type: 'boolean', + type: types.boolean, + optional: bool.false, nullable: bool.false, description: 'Whether disabled open registration.', }, disableLocalTimeline: { - type: 'boolean', + type: types.boolean, + optional: bool.false, nullable: bool.false, description: 'Whether disabled LTL and STL.', }, disableGlobalTimeline: { - type: 'boolean', + type: types.boolean, + optional: bool.false, nullable: bool.false, description: 'Whether disabled GTL.', }, enableEmojiReaction: { - type: 'boolean', + type: types.boolean, + optional: bool.false, nullable: bool.false, description: 'Whether enabled emoji reaction.', }, } @@ -79,7 +92,7 @@ export const meta = { }; export default define(meta, async (ps, me) => { - const instance = await fetchMeta(); + const instance = await fetchMeta(true); const emojis = await Emojis.find({ host: null }); |