769317777c
* Add specific dashboard route * Port application route to Octane * Fetch/sync contributors in application route, but only sync contributions in dashboard route for now
19 lines
522 B
JavaScript
19 lines
522 B
JavaScript
import Route from '@ember/routing/route';
|
|
import { schedule } from '@ember/runloop';
|
|
import { inject as service } from '@ember/service';
|
|
|
|
export default class DashboardRoute extends Route {
|
|
|
|
@service kredits;
|
|
|
|
afterModel() {
|
|
if (this.kredits.contributionsNeedSync) {
|
|
schedule('afterRender', this.kredits.syncContributions,
|
|
this.kredits.syncContributions.perform);
|
|
}
|
|
schedule('afterRender', this.kredits.fetchMissingContributions,
|
|
this.kredits.fetchMissingContributions.perform);
|
|
}
|
|
|
|
}
|