Process contribution data before loading models
This commit is contained in:
Vendored
+5
-1
@@ -1,4 +1,5 @@
|
||||
import Contributor from 'kredits-web/models/contributor';
|
||||
import processContributorData from 'kredits-web/utils/process-contributor-data';
|
||||
|
||||
const contributors = [];
|
||||
|
||||
@@ -8,6 +9,9 @@ const data = [
|
||||
{ id: '3', name: 'Manuel', totalKreditsEarned: 0, github_uid: 54812 }
|
||||
];
|
||||
|
||||
data.forEach(attrs => contributors.push(Contributor.create(attrs)));
|
||||
data.forEach(attrs => {
|
||||
const c = Contributor.create(processContributorData(attrs));
|
||||
contributors.push(c);
|
||||
});
|
||||
|
||||
export default contributors;
|
||||
|
||||
Reference in New Issue
Block a user