Files
kredits-web/app/models/contributor.js
T
fsmanuel b21d2ad864 Extract serializer logic into lib
To use the same code in hubot I extracted the serializer logic into lib to later move it into `truffle-kredits` when we are done with all other common logic.
2018-04-07 17:22:33 +00:00

25 lines
547 B
JavaScript

import computed from 'ember-computed';
import EmberObject from 'ember-object';
export default EmberObject.extend({
id: null,
address: null,
name: null,
kind: null,
url: null,
github_username: null,
github_uid: null,
wiki_username: null,
profileHash: null,
balance: null,
isCore: false,
isCurrentUser: false,
avatarURL: computed('github_uid', function() {
let github_uid = this.get('github_uid');
if (github_uid) {
return `https://avatars2.githubusercontent.com/u/${github_uid}?v=3&s=128`;
}
}),
});