summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/meta.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-06-27 18:04:09 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-06-27 18:04:09 +0900
commit952789cc1eb77e2f2d54b489c016b56bac812ab7 (patch)
tree47aae1704f1617f9ae081291547085ba04677a2e /src/server/api/endpoints/meta.ts
parent11.23.1 (diff)
downloadsharkey-952789cc1eb77e2f2d54b489c016b56bac812ab7.tar.gz
sharkey-952789cc1eb77e2f2d54b489c016b56bac812ab7.tar.bz2
sharkey-952789cc1eb77e2f2d54b489c016b56bac812ab7.zip
Use as const
#5089
Diffstat (limited to 'src/server/api/endpoints/meta.ts')
-rw-r--r--src/server/api/endpoints/meta.ts49
1 files changed, 24 insertions, 25 deletions
diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts
index 1aa9a855dd..a3390a011d 100644
--- a/src/server/api/endpoints/meta.ts
+++ b/src/server/api/endpoints/meta.ts
@@ -5,7 +5,6 @@ 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';
import { getConnection } from 'typeorm';
import redis from '../../../db/redis';
@@ -29,40 +28,40 @@ export const meta = {
},
res: {
- type: types.object,
- optional: bool.false, nullable: bool.false,
+ type: 'object' as const,
+ optional: false as const, nullable: false as const,
properties: {
version: {
- type: types.string,
- optional: bool.false, nullable: bool.false,
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
description: 'The version of Misskey of this instance.',
example: pkg.version
},
name: {
- type: types.string,
- optional: bool.false, nullable: bool.false,
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
description: 'The name of this instance.',
},
description: {
- type: types.string,
- optional: bool.false, nullable: bool.false,
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
description: 'The description of this instance.',
},
announcements: {
- type: types.array,
- optional: bool.false, nullable: bool.false,
+ type: 'array' as const,
+ optional: false as const, nullable: false as const,
items: {
- type: types.object,
- optional: bool.false, nullable: bool.false,
+ type: 'object' as const,
+ optional: false as const, nullable: false as const,
properties: {
title: {
- type: types.string,
- optional: bool.false, nullable: bool.false,
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
description: 'The title of the announcement.',
},
text: {
- type: types.string,
- optional: bool.false, nullable: bool.false,
+ type: 'string' as const,
+ optional: false as const, nullable: false as const,
description: 'The text of the announcement. (can be HTML)',
},
}
@@ -70,23 +69,23 @@ export const meta = {
description: 'The announcements of this instance.',
},
disableRegistration: {
- type: types.boolean,
- optional: bool.false, nullable: bool.false,
+ type: 'boolean' as const,
+ optional: false as const, nullable: false as const,
description: 'Whether disabled open registration.',
},
disableLocalTimeline: {
- type: types.boolean,
- optional: bool.false, nullable: bool.false,
+ type: 'boolean' as const,
+ optional: false as const, nullable: false as const,
description: 'Whether disabled LTL and STL.',
},
disableGlobalTimeline: {
- type: types.boolean,
- optional: bool.false, nullable: bool.false,
+ type: 'boolean' as const,
+ optional: false as const, nullable: false as const,
description: 'Whether disabled GTL.',
},
enableEmojiReaction: {
- type: types.boolean,
- optional: bool.false, nullable: bool.false,
+ type: 'boolean' as const,
+ optional: false as const, nullable: false as const,
description: 'Whether enabled emoji reaction.',
},
}