server: migrate method call configs to immutable arrays

This commit is contained in:
Jesse Chan
2020-10-07 00:25:42 +08:00
parent 6237310fcb
commit 16465f4239
17 changed files with 428 additions and 432 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import torrentStatusMap from '../../shared/constants/torrentStatusMap';
import type {Taxonomy, TaxonomyDiffs} from '../../shared/types/Taxonomy';
import type {TorrentStatus} from '../../shared/constants/torrentStatusMap';
import type {TorrentProperties, Torrents} from '../../shared/types/Torrent';
import type {TorrentProperties, TorrentList} from '../../shared/types/Torrent';
interface TaxonomyServiceEvents {
TAXONOMY_DIFF_CHANGE: (payload: {id: number; diff: TaxonomyDiffs}) => void;
@@ -74,7 +74,7 @@ class TaxonomyService extends BaseService<TaxonomyServiceEvents> {
this.taxonomy.trackerCounts = {all: 0};
}
handleProcessTorrentListEnd({torrents}: {torrents: Torrents}) {
handleProcessTorrentListEnd({torrents}: {torrents: TorrentList}) {
const {length} = Object.keys(torrents);
this.taxonomy.statusCounts.all = length;