mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-24 21:19:07 +01:00
27 lines
493 B
TypeScript
27 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
|
|
});
|
|
});
|