jonpitch/danger-brewing

View on GitHub
app/routes/application.js

Summary

Maintainability
A
0 mins
Test Coverage
import Ember from 'ember';
const {
  Route,
  inject
} = Ember;

export default Route.extend({
  session: inject.service(),
  fastboot: inject.service(),

  beforeModel() {
    if (this.get('fastboot.isFastboot')) {
      return this._super(...arguments);
    }

    return this.get('session').fetch().catch(() => { });
  },

  actions: {

    accessDenied() {
      this.transitionTo('index');
    }
  }
});