Linting
This commit is contained in:
parent
aeb3206fd9
commit
21e0e6c624
10 changed files with 112 additions and 87 deletions
|
@ -1,7 +1,9 @@
|
|||
import DS from 'ember-data';
|
||||
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';
|
||||
|
||||
export default DS.RESTAdapter.extend(DataAdapterMixin, {
|
||||
const { RESTAdapter } = DS;
|
||||
|
||||
export default RESTAdapter.extend(DataAdapterMixin, {
|
||||
authorizer: 'authorizer:application',
|
||||
|
||||
namespace: function() {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import Ember from 'ember';
|
||||
import ApplicationRouteMixin from 'ember-simple-auth/mixins/application-route-mixin';
|
||||
|
||||
export default Ember.Route.extend(ApplicationRouteMixin, {
|
||||
const { Route } = Ember;
|
||||
|
||||
export default Route.extend(ApplicationRouteMixin, {
|
||||
actions: {
|
||||
invalidateSession: function() {
|
||||
this.get('session').invalidate().then(() => {
|
||||
|
@ -9,7 +11,5 @@ export default Ember.Route.extend(ApplicationRouteMixin, {
|
|||
return true;
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
});
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
const { Route } = Ember;
|
||||
|
||||
export default Route.extend({
|
||||
redirect: function() {
|
||||
let url = this.router.location.formatURL('/not-found');
|
||||
const url = this.router.location.formatURL('/not-found');
|
||||
|
||||
if (window.location.pathname !== url) {
|
||||
this.transitionTo('/not-found');
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
import Ember from 'ember';
|
||||
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||
|
||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||
const { Route } = Ember;
|
||||
|
||||
export default Route.extend(AuthenticatedRouteMixin, {
|
||||
actions: {
|
||||
error: function() {
|
||||
error: function(err) {
|
||||
console.log(err);
|
||||
this.transitionTo('/not-found');
|
||||
},
|
||||
|
||||
|
|
Reference in a new issue