summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/stats.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/stats.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/stats.ts')
-rw-r--r--src/server/api/endpoints/stats.ts25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/server/api/endpoints/stats.ts b/src/server/api/endpoints/stats.ts
index 4dca62445f..c86d893d5e 100644
--- a/src/server/api/endpoints/stats.ts
+++ b/src/server/api/endpoints/stats.ts
@@ -1,7 +1,6 @@
import define from '../define';
import { Notes, Users } from '../../../models';
import { federationChart, driveChart } from '../../../services/chart';
-import { bool, types } from '../../../misc/schema';
export const meta = {
requireCredential: false,
@@ -16,32 +15,32 @@ 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: {
notesCount: {
- type: types.number,
- optional: bool.false, nullable: bool.false,
+ type: 'number' as const,
+ optional: false as const, nullable: false as const,
description: 'The count of all (local/remote) notes of this instance.',
},
originalNotesCount: {
- type: types.number,
- optional: bool.false, nullable: bool.false,
+ type: 'number' as const,
+ optional: false as const, nullable: false as const,
description: 'The count of all local notes of this instance.',
},
usersCount: {
- type: types.number,
- optional: bool.false, nullable: bool.false,
+ type: 'number' as const,
+ optional: false as const, nullable: false as const,
description: 'The count of all (local/remote) accounts of this instance.',
},
originalUsersCount: {
- type: types.number,
- optional: bool.false, nullable: bool.false,
+ type: 'number' as const,
+ optional: false as const, nullable: false as const,
description: 'The count of all local accounts of this instance.',
},
instances: {
- type: types.number,
- optional: bool.false, nullable: bool.false,
+ type: 'number' as const,
+ optional: false as const, nullable: false as const,
description: 'The count of federated instances.',
},
}