mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 18:52:05 +03:00
84cfd529ed
closes #3081 - added route `/ghost/api/v0.1/authentication/invitation` - added accept invitation - added signup with token - removed check() from users api - fixed promise in resetPassword()
21 lines
710 B
JavaScript
21 lines
710 B
JavaScript
import styleBody from 'ghost/mixins/style-body';
|
|
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
|
|
|
var SignupRoute = Ember.Route.extend(styleBody, loadingIndicator, {
|
|
classNames: ['ghost-signup'],
|
|
beforeModel: function () {
|
|
if (this.get('session').isAuthenticated) {
|
|
this.transitionTo(Ember.SimpleAuth.routeAfterAuthentication);
|
|
}
|
|
},
|
|
setupController: function (controller, params) {
|
|
var tokenText = atob(params.token),
|
|
email = tokenText.split('|')[1];
|
|
controller.token = params.token;
|
|
controller.email = email;
|
|
controller.name = email.substring(0, email.indexOf('@'));
|
|
}
|
|
});
|
|
|
|
export default SignupRoute;
|