Refactor routes
* Add specific dashboard route * Port application route to Octane * Fetch/sync contributors in application route, but only sync contributions in dashboard route for now
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user