From af9cb20fc007d2fa5672a620d4adc9116675d363 Mon Sep 17 00:00:00 2001 From: OldHawk Date: Mon, 21 May 2018 23:36:49 +0800 Subject: [PATCH] fix(torrents): fixed torrent tags filter issue in user status page --- .../torrents/client/controllers/torrents.client.controller.js | 4 ---- .../controllers/admin/user-uploaded.client.controller.js | 2 +- .../client/controllers/status/uploaded.client.controller.js | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/torrents/client/controllers/torrents.client.controller.js b/modules/torrents/client/controllers/torrents.client.controller.js index 4f30c5fc..6852dbc3 100644 --- a/modules/torrents/client/controllers/torrents.client.controller.js +++ b/modules/torrents/client/controllers/torrents.client.controller.js @@ -48,7 +48,6 @@ } else { vm.filterType = vm.torrentType; } - console.log('vm.filterType = ' + vm.filterType); }); /** @@ -312,9 +311,6 @@ //if searchKey or searchTags has value, the skip=0 var skip = 0; - console.log(vm.filterType); - console.log(vm.torrentType); - TorrentsService.get({ skip: (p - 1) * vm.torrentItemsPerPage + skip, limit: vm.torrentItemsPerPage, diff --git a/modules/users/client/controllers/admin/user-uploaded.client.controller.js b/modules/users/client/controllers/admin/user-uploaded.client.controller.js index afcd3b0d..eb9bf214 100644 --- a/modules/users/client/controllers/admin/user-uploaded.client.controller.js +++ b/modules/users/client/controllers/admin/user-uploaded.client.controller.js @@ -83,7 +83,7 @@ skip: (p - 1) * vm.itemsPerPage, limit: vm.itemsPerPage, userid: $state.params.userId, - torrent_type: vm.filterType ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType), + torrent_type: (vm.filterType && vm.filterType !== 'aggregate') ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType), torrent_status: 'all', torrent_vip: vm.filterVIP ? vm.filterVIP : undefined, torrent_rlevel: vm.torrentRLevel, diff --git a/modules/users/client/controllers/status/uploaded.client.controller.js b/modules/users/client/controllers/status/uploaded.client.controller.js index ae348a8f..c347491e 100644 --- a/modules/users/client/controllers/status/uploaded.client.controller.js +++ b/modules/users/client/controllers/status/uploaded.client.controller.js @@ -83,7 +83,7 @@ skip: (p - 1) * vm.itemsPerPage, limit: vm.itemsPerPage, userid: vm.user._id, - torrent_type: vm.filterType ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType), + torrent_type: (vm.filterType && vm.filterType !== 'aggregate') ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType), torrent_status: 'all', torrent_vip: vm.filterVIP ? vm.filterVIP : undefined, torrent_rlevel: vm.torrentRLevel,