diff --git a/app/static/js/ResourceLists/CorpusList.js b/app/static/js/ResourceLists/CorpusList.js index 2e41d82e..deebb356 100644 --- a/app/static/js/ResourceLists/CorpusList.js +++ b/app/static/js/ResourceLists/CorpusList.js @@ -21,15 +21,15 @@ class CorpusList extends ResourceList { }); }); app.getUser(this.userId).then((user) => { - this.add(this.equalizer(user)); + this.add(this.aggregateData(user)); this.isInitialized = true; }); } - equalizer(user) { - const equalizedData = []; + aggregateData(user) { + const aggregatedData = []; for (let corpus of Object.values(user.corpora)) { - equalizedData.push( + aggregatedData.push( { 'id': corpus.id, 'creation-date': corpus.creation_date, @@ -43,7 +43,7 @@ class CorpusList extends ResourceList { ); } for (let cfa of Object.values(user.corpus_follower_associations)) { - equalizedData.push( + aggregatedData.push( { 'id': cfa.corpus.id, 'creation-date': cfa.corpus.creation_date, @@ -56,7 +56,7 @@ class CorpusList extends ResourceList { } ); } - return equalizedData; + return aggregatedData; } // #region Mandatory getters and methods to implement @@ -130,10 +130,6 @@ class CorpusList extends ResourceList { `.trim(); } - mapResourceToValue(equalizedData) { - return equalizedData; - } - sort() { this.listjs.sort('creation-date', {order: 'desc'}); }