@bennerinformatics/ember-fw-gc
Version:
A set of components, controllers, routes, and helpers used in all Group-Control managed FW App System applications
24 lines (19 loc) • 647 B
JavaScript
import BaseRoute from '@bennerinformatics/ember-fw/routes/base';
import UnauthenticatedRouteMixin from 'ember-simple-auth/mixins/unauthenticated-route-mixin';
// Reset password route handler
export default BaseRoute.extend(UnauthenticatedRouteMixin, {
model(params, transition) {
if (!params.token) {
transition.abort();
this.transitionTo('login');
}
},
deactivate() {
let controller = this.get('controller');
this._super(...arguments);
controller.setProperties({
password: '',
confirmPassword: ''
});
}
});