async function generateNodeinfo (req: express.Request, res: express.Response) {
const { totalVideos } = await VideoModel.getStats()
const { totalLocalVideoComments } = await VideoCommentModel.getStats()
- const { totalUsers } = await UserModel.getStats()
+ const { totalUsers, totalMonthlyActiveUsers, totalHalfYearActiveUsers } = await UserModel.getStats()
let json = {}
if (req.params.version && (req.params.version === '2.0')) {
openRegistrations: CONFIG.SIGNUP.ENABLED,
usage: {
users: {
- total: totalUsers
+ total: totalUsers,
+ activeMonth: totalMonthlyActiveUsers,
+ activeHalfyear: totalHalfYearActiveUsers
},
localPosts: totalVideos,
localComments: totalLocalVideoComments
const totalDailyActiveUsers = await getActiveUsers(1)
const totalWeeklyActiveUsers = await getActiveUsers(7)
const totalMonthlyActiveUsers = await getActiveUsers(30)
+ const totalHalfYearActiveUsers = await getActiveUsers(180)
return {
totalUsers,
totalDailyActiveUsers,
totalWeeklyActiveUsers,
- totalMonthlyActiveUsers
+ totalMonthlyActiveUsers,
+ totalHalfYearActiveUsers
}
}