mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-14 16:55:42 +00:00
Rename function
This commit is contained in:
parent
589c4a6c56
commit
15e7fa6dd3
@ -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'});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user