Rename variables for easy reference

This commit is contained in:
Ben Adrian Sarmiento
2024-07-21 02:11:32 +02:00
parent 47751320f7
commit f8b9f8955b
8 changed files with 46 additions and 33 deletions

View File

@@ -56,7 +56,7 @@ func (zr *Handlers) generateResponse(req *http.Request) (*RootResponse, error) {
var mem runtime.MemStats
runtime.ReadMemStats(&mem)
allTorrents, _ := zr.torMgr.DirectoryMap.Get(config.ALL_TORRENTS)
torrents, _ := zr.torMgr.DirectoryMap.Get(config.ALL_TORRENTS)
repairQueueStr := ""
if zr.torMgr.RepairQueue == nil {
@@ -108,7 +108,7 @@ func (zr *Handlers) generateResponse(req *http.Request) (*RootResponse, error) {
Logs: fmt.Sprintf("//%s/logs/", req.Host),
UserInfo: userInfo,
TrafficServedPerAPI: trafficFromAPI,
LibrarySize: allTorrents.Count(),
LibrarySize: torrents.Count(),
TorrentsToRepair: repairQueueStr,
MemAlloc: bToMb(mem.Alloc),
TotalAlloc: bToMb(mem.TotalAlloc),