mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-11-18 14:46:26 +01:00
26 lines
493 B
TypeScript
26 lines
493 B
TypeScript
import Note from '../../../models/note';
|
|
import User from '../../../models/user';
|
|
|
|
/**
|
|
* Get the misskey's statistics
|
|
*/
|
|
module.exports = params => new Promise(async (res, rej) => {
|
|
const notesCount = await Note.count();
|
|
|
|
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
|
|
});
|
|
});
|