mirror of
https://github.com/misskey-dev/misskey
synced 2024-11-23 22:56:58 +09:00
Update nodeinfo.ts (#4239)
* Update nodeinfo.ts * Update nodeinfo.ts * Update nodeinfo.ts * Update nodeinfo.ts * Update nodeinfo.ts
This commit is contained in:
parent
0303bccc61
commit
a8946b0404
@ -1,9 +1,9 @@
|
|||||||
import * as Router from 'koa-router';
|
import * as Router from 'koa-router';
|
||||||
import config from '../config';
|
import config from '../config';
|
||||||
import fetchMeta from '../misc/fetch-meta';
|
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 { name as softwareName, version, repository } from '../../package.json';
|
||||||
import Note from '../models/note';
|
// import Note from '../models/note';
|
||||||
|
|
||||||
const router = new Router();
|
const router = new Router();
|
||||||
|
|
||||||
@ -21,18 +21,18 @@ export const links = [/* (awaiting release) {
|
|||||||
const nodeinfo2 = async () => {
|
const nodeinfo2 = async () => {
|
||||||
const [
|
const [
|
||||||
{ name, description, maintainer, langs, broadcasts, disableRegistration, disableLocalTimeline, disableGlobalTimeline, enableRecaptcha, maxNoteTextLength, enableTwitterIntegration, enableGithubIntegration, enableDiscordIntegration, enableEmail, enableServiceWorker },
|
{ name, description, maintainer, langs, broadcasts, disableRegistration, disableLocalTimeline, disableGlobalTimeline, enableRecaptcha, maxNoteTextLength, enableTwitterIntegration, enableGithubIntegration, enableDiscordIntegration, enableEmail, enableServiceWorker },
|
||||||
total,
|
// total,
|
||||||
activeHalfyear,
|
// activeHalfyear,
|
||||||
activeMonth,
|
// activeMonth,
|
||||||
localPosts,
|
// localPosts,
|
||||||
localComments
|
// localComments
|
||||||
] = await Promise.all([
|
] = await Promise.all([
|
||||||
fetchMeta(),
|
fetchMeta(),
|
||||||
User.count({ host: 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() - 15552000000) } }),
|
||||||
User.count({ host: null, updatedAt: { $gt: new Date(Date.now() - 2592000000) } }),
|
// User.count({ host: null, updatedAt: { $gt: new Date(Date.now() - 2592000000) } }),
|
||||||
Note.count({ '_user.host': null, replyId: null }),
|
// Note.count({ '_user.host': null, replyId: null }),
|
||||||
Note.count({ '_user.host': null, replyId: { $ne: null } })
|
// Note.count({ '_user.host': null, replyId: { $ne: null } })
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -48,9 +48,9 @@ const nodeinfo2 = async () => {
|
|||||||
},
|
},
|
||||||
openRegistrations: !disableRegistration,
|
openRegistrations: !disableRegistration,
|
||||||
usage: {
|
usage: {
|
||||||
users: { total, activeHalfyear, activeMonth },
|
users: {} // { total, activeHalfyear, activeMonth },
|
||||||
localPosts,
|
// localPosts,
|
||||||
localComments
|
// localComments
|
||||||
},
|
},
|
||||||
metadata: { name, description, maintainer, langs, broadcasts, disableRegistration, disableLocalTimeline, disableGlobalTimeline, enableRecaptcha, maxNoteTextLength, enableTwitterIntegration, enableGithubIntegration, enableDiscordIntegration, enableEmail, enableServiceWorker }
|
metadata: { name, description, maintainer, langs, broadcasts, disableRegistration, disableLocalTimeline, disableGlobalTimeline, enableRecaptcha, maxNoteTextLength, enableTwitterIntegration, enableGithubIntegration, enableDiscordIntegration, enableEmail, enableServiceWorker }
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user