diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2019-04-23 22:35:26 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-23 22:35:26 +0900 |
| commit | 0463c6bb0f8fd32740ceb61ccce04c662272a618 (patch) | |
| tree | a28cbdf6c9cdc14648b8c0e46248665a3ad7e5af /src/server/api/endpoints/meta.ts | |
| parent | Fix #4768 (diff) | |
| download | sharkey-0463c6bb0f8fd32740ceb61ccce04c662272a618.tar.gz sharkey-0463c6bb0f8fd32740ceb61ccce04c662272a618.tar.bz2 sharkey-0463c6bb0f8fd32740ceb61ccce04c662272a618.zip | |
Refactor API (#4770)
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update description.ts
* wip
Diffstat (limited to 'src/server/api/endpoints/meta.ts')
| -rw-r--r-- | src/server/api/endpoints/meta.ts | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts index 785f21f22b..71b950f4ce 100644 --- a/src/server/api/endpoints/meta.ts +++ b/src/server/api/endpoints/meta.ts @@ -5,6 +5,7 @@ import define from '../define'; 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.', }, } |