- const videosRedundancyStats = await Promise.all(
- CONFIG.REDUNDANCY.VIDEOS.STRATEGIES.map(r => {
- return VideoRedundancyModel.getStats(r.strategy)
- .then(stats => Object.assign(stats, { strategy: r.strategy, totalSize: r.size }))
- })
- )
-
- const data: ServerStats = {
- totalLocalVideos,
- totalLocalVideoViews,
- totalVideos,
- totalLocalVideoComments,
- totalVideoComments,
- totalUsers,
- totalInstanceFollowers,
- totalInstanceFollowing,
- videosRedundancy: videosRedundancyStats
- }
-
- return res.json(data).end()