diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2019-02-13 15:56:45 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-02-13 15:56:45 +0900 |
| commit | a8946b04047d97d8a3265df74cb597f73879ff90 (patch) | |
| tree | d9959f2098ab3b8180737a6b924cd604959bb1eb /src/server | |
| parent | Update vue-i18n requirement from 8.8.0 to 8.8.1 (#4235) (diff) | |
| download | sharkey-a8946b04047d97d8a3265df74cb597f73879ff90.tar.gz sharkey-a8946b04047d97d8a3265df74cb597f73879ff90.tar.bz2 sharkey-a8946b04047d97d8a3265df74cb597f73879ff90.zip | |
Update nodeinfo.ts (#4239)
* Update nodeinfo.ts
* Update nodeinfo.ts
* Update nodeinfo.ts
* Update nodeinfo.ts
* Update nodeinfo.ts
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/nodeinfo.ts | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/server/nodeinfo.ts b/src/server/nodeinfo.ts index 5abb2e4973..9e4ce37b81 100644 --- a/src/server/nodeinfo.ts +++ b/src/server/nodeinfo.ts @@ -1,9 +1,9 @@ import * as Router from 'koa-router'; import config from '../config'; import fetchMeta from '../misc/fetch-meta'; -import User from '../models/user'; +// import User from '../models/user'; import { name as softwareName, version, repository } from '../../package.json'; -import Note from '../models/note'; +// import Note from '../models/note'; const router = new Router(); @@ -21,18 +21,18 @@ export const links = [/* (awaiting release) { const nodeinfo2 = async () => { const [ { name, description, maintainer, langs, broadcasts, disableRegistration, disableLocalTimeline, disableGlobalTimeline, enableRecaptcha, maxNoteTextLength, enableTwitterIntegration, enableGithubIntegration, enableDiscordIntegration, enableEmail, enableServiceWorker }, - total, - activeHalfyear, - activeMonth, - localPosts, - localComments + // total, + // activeHalfyear, + // activeMonth, + // localPosts, + // localComments ] = await Promise.all([ fetchMeta(), - User.count({ host: null }), - User.count({ host: null, updatedAt: { $gt: new Date(Date.now() - 15552000000) } }), - User.count({ host: null, updatedAt: { $gt: new Date(Date.now() - 2592000000) } }), - Note.count({ '_user.host': null, replyId: null }), - Note.count({ '_user.host': null, replyId: { $ne: null } }) + // User.count({ host: null }), + // User.count({ host: null, updatedAt: { $gt: new Date(Date.now() - 15552000000) } }), + // User.count({ host: null, updatedAt: { $gt: new Date(Date.now() - 2592000000) } }), + // Note.count({ '_user.host': null, replyId: null }), + // Note.count({ '_user.host': null, replyId: { $ne: null } }) ]); return { @@ -48,9 +48,9 @@ const nodeinfo2 = async () => { }, openRegistrations: !disableRegistration, usage: { - users: { total, activeHalfyear, activeMonth }, - localPosts, - localComments + users: {} // { total, activeHalfyear, activeMonth }, + // localPosts, + // localComments }, metadata: { name, description, maintainer, langs, broadcasts, disableRegistration, disableLocalTimeline, disableGlobalTimeline, enableRecaptcha, maxNoteTextLength, enableTwitterIntegration, enableGithubIntegration, enableDiscordIntegration, enableEmail, enableServiceWorker } }; |