mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-01 00:18:19 +02:00
fix(core): fixed site total Info issues, by 'ruhul'
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
.controller('HeaderController', HeaderController);
|
||||
|
||||
HeaderController.$inject = ['$scope', '$state', '$stateParams', '$translate', 'Authentication', 'menuService', 'MeanTorrentConfig', 'localStorageService',
|
||||
'ScoreLevelService', 'InvitationsService', '$interval', 'MessagesService', 'TorrentsService', 'UsersService'];
|
||||
'ScoreLevelService', 'InvitationsService', '$interval', 'MessagesService', 'TorrentsService', 'UsersService', 'DebugConsoleService'];
|
||||
|
||||
function HeaderController($scope, $state, $stateParams, $translate, Authentication, menuService, MeanTorrentConfig, localStorageService, ScoreLevelService,
|
||||
InvitationsService, $interval, MessagesService, TorrentsService, UsersService) {
|
||||
InvitationsService, $interval, MessagesService, TorrentsService, UsersService, mtDebug) {
|
||||
var vm = this;
|
||||
vm.user = Authentication.user;
|
||||
vm.language = MeanTorrentConfig.meanTorrentConfig.language;
|
||||
@@ -136,6 +136,7 @@
|
||||
vm.getSiteInfo = function () {
|
||||
TorrentsService.siteInfo(function (data) {
|
||||
vm.siteInfo = data;
|
||||
mtDebug.info(data);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1296,13 +1296,13 @@ exports.siteInfo = function (req, res) {
|
||||
res.json({
|
||||
totalUsers: results[0],
|
||||
totalTorrents: results[1],
|
||||
totalTorrentsSize: results[2][0].size,
|
||||
totalSeeders: results[2][0].seeders,
|
||||
totalLeechers: results[2][0].leechers,
|
||||
totalUploaded: results[3][0].uploaded,
|
||||
totalDownloaded: results[3][0].downloaded,
|
||||
totalTorrentsSize: results[2][0] ? results[2][0].size : 0,
|
||||
totalSeeders: results[2][0] ? results[2][0].seeders : 0,
|
||||
totalLeechers: results[2][0] ? results[2][0].leechers : 0,
|
||||
totalUploaded: results[3][0] ? results[3][0].uploaded : 0,
|
||||
totalDownloaded: results[3][0] ? results[3][0].downloaded : 0,
|
||||
totalForumTopics: results[4],
|
||||
totalForumReplies: results[5][0].replies,
|
||||
totalForumReplies: results[5][0] ? results[5][0].replies : 0,
|
||||
totalVipUsers: results[6]
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user