Skip to content
Snippets Groups Projects
Commit 15e7fa6d authored by Inga Kirschnick's avatar Inga Kirschnick
Browse files

Rename function

parent 589c4a6c
No related branches found
No related tags found
No related merge requests found
...@@ -21,15 +21,15 @@ class CorpusList extends ResourceList { ...@@ -21,15 +21,15 @@ class CorpusList extends ResourceList {
}); });
}); });
app.getUser(this.userId).then((user) => { app.getUser(this.userId).then((user) => {
this.add(this.equalizer(user)); this.add(this.aggregateData(user));
this.isInitialized = true; this.isInitialized = true;
}); });
} }
equalizer(user) { aggregateData(user) {
const equalizedData = []; const aggregatedData = [];
for (let corpus of Object.values(user.corpora)) { for (let corpus of Object.values(user.corpora)) {
equalizedData.push( aggregatedData.push(
{ {
'id': corpus.id, 'id': corpus.id,
'creation-date': corpus.creation_date, 'creation-date': corpus.creation_date,
...@@ -43,7 +43,7 @@ class CorpusList extends ResourceList { ...@@ -43,7 +43,7 @@ class CorpusList extends ResourceList {
); );
} }
for (let cfa of Object.values(user.corpus_follower_associations)) { for (let cfa of Object.values(user.corpus_follower_associations)) {
equalizedData.push( aggregatedData.push(
{ {
'id': cfa.corpus.id, 'id': cfa.corpus.id,
'creation-date': cfa.corpus.creation_date, 'creation-date': cfa.corpus.creation_date,
...@@ -56,7 +56,7 @@ class CorpusList extends ResourceList { ...@@ -56,7 +56,7 @@ class CorpusList extends ResourceList {
} }
); );
} }
return equalizedData; return aggregatedData;
} }
// #region Mandatory getters and methods to implement // #region Mandatory getters and methods to implement
...@@ -130,10 +130,6 @@ class CorpusList extends ResourceList { ...@@ -130,10 +130,6 @@ class CorpusList extends ResourceList {
`.trim(); `.trim();
} }
mapResourceToValue(equalizedData) {
return equalizedData;
}
sort() { sort() {
this.listjs.sort('creation-date', {order: 'desc'}); this.listjs.sort('creation-date', {order: 'desc'});
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment