diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2018-06-18 14:43:56 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-18 14:43:56 +0900 |
| commit | 5d3943ffa8cb4090c5c111397e266d255cc2212b (patch) | |
| tree | 46f692fb21005bdc89499ea012c2436e8a2e90c0 /src/server/api/endpoints/stats.ts | |
| parent | New translations ja.yml (Spanish) (diff) | |
| parent | yatta (diff) | |
| download | misskey-5d3943ffa8cb4090c5c111397e266d255cc2212b.tar.gz misskey-5d3943ffa8cb4090c5c111397e266d255cc2212b.tar.bz2 misskey-5d3943ffa8cb4090c5c111397e266d255cc2212b.zip | |
Merge branch 'master' into l10n_master
Diffstat (limited to 'src/server/api/endpoints/stats.ts')
| -rw-r--r-- | src/server/api/endpoints/stats.ts | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/server/api/endpoints/stats.ts b/src/server/api/endpoints/stats.ts index d1e17651f2..74ab6ba945 100644 --- a/src/server/api/endpoints/stats.ts +++ b/src/server/api/endpoints/stats.ts @@ -1,26 +1,10 @@ -import Note from '../../../models/note'; -import User from '../../../models/user'; +import Meta from '../../../models/meta'; /** * Get the misskey's statistics */ -module.exports = params => new Promise(async (res, rej) => { - const notesCount = await Note.count(); +module.exports = () => new Promise(async (res, rej) => { + const meta = await Meta.findOne(); - const usersCount = await User.count(); - - const originalNotesCount = await Note.count({ - '_user.host': null - }); - - const originalUsersCount = await User.count({ - host: null - }); - - res({ - notesCount, - usersCount, - originalNotesCount, - originalUsersCount - }); + res(meta.stats); }); |