From 367341c7803ebc5c4c6ca1817416a0685bdc3e35 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Tue, 10 Nov 2015 07:55:08 -0700 Subject: [PATCH] Lint user lockout --- app/pods/users/lockoutauthenticate/controller.js | 6 ++++-- app/pods/users/lockoutauthenticate/route.js | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/pods/users/lockoutauthenticate/controller.js b/app/pods/users/lockoutauthenticate/controller.js index 79734b5..4adee77 100644 --- a/app/pods/users/lockoutauthenticate/controller.js +++ b/app/pods/users/lockoutauthenticate/controller.js @@ -1,6 +1,8 @@ import Ember from 'ember'; -export default Ember.Controller.extend({ - queryParams: ['token'], +const { Controller } = Ember; +export default Controller.extend({ + queryParams: ['token'], + token: null, }); diff --git a/app/pods/users/lockoutauthenticate/route.js b/app/pods/users/lockoutauthenticate/route.js index 8ace7ef..21f807d 100644 --- a/app/pods/users/lockoutauthenticate/route.js +++ b/app/pods/users/lockoutauthenticate/route.js @@ -1,14 +1,16 @@ import Ember from 'ember'; import UnauthenticatedRouteMixin from 'ember-simple-auth/mixins/unauthenticated-route-mixin'; -export default Ember.Route.extend(UnauthenticatedRouteMixin, { - session: Ember.inject.service('session'), - currentUser: Ember.inject.service('session-account'), +const { Route, get, inject: { service } } = Ember; + +export default Route.extend(UnauthenticatedRouteMixin, { + session: service(), + currentUser: service('session-account'), beforeModel: function(transition) { this._super(transition); - let token = Ember.get(transition, 'queryParams.token'); + const token = get(transition, 'queryParams.token'); this.get('session').authenticate('authenticator:jwt-resolved', token).then(() => { this.get('currentUser.account').then((account) => { this.transitionTo('protected.users.changepassword', account.get('id'));