]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/server/stats.ts
Fix total videos stats
[github/Chocobozzz/PeerTube.git] / server / controllers / api / server / stats.ts
index 6d508a481d7beb67024bb15ce688341309823745..f6a85d0c066d3cebcdd4cb209586ece23e853890 100644 (file)
@@ -26,11 +26,12 @@ async function getStats (req: express.Request, res: express.Response) {
   const { totalInstanceFollowers, totalInstanceFollowing } = await ActorFollowModel.getStats()
   const { totalLocalVideoFilesSize } = await VideoFileModel.getStats()
 
-  const strategies: { strategy: VideoRedundancyStrategyWithManual, size: number }[] = CONFIG.REDUNDANCY.VIDEOS.STRATEGIES
-                                                                                            .map(r => ({
-                                                                                              strategy: r.strategy,
-                                                                                              size: r.size
-                                                                                            }))
+  const strategies = CONFIG.REDUNDANCY.VIDEOS.STRATEGIES
+                          .map(r => ({
+                            strategy: r.strategy as VideoRedundancyStrategyWithManual,
+                            size: r.size
+                          }))
+
   strategies.push({ strategy: 'manual', size: null })
 
   const videosRedundancyStats = await Promise.all(