Merge pull request #5789 from cobbspur/spinner

Keep spinner running on successful signin
This commit is contained in:
Kevin Ansfield 2015-09-02 18:02:22 +01:00
commit 5edca27748

View File

@ -21,9 +21,8 @@ export default Ember.Controller.extend(ValidationEngine, {
authStrategy = 'ghost-authenticator:oauth2-password-grant',
data = model.getProperties(this.authProperties);
this.get('session').authenticate(authStrategy, data).then(function () {
self.toggleProperty('loggingIn');
}).catch(function (err) {
// Authentication transitions to posts.index, we can leave spinner running unless there is an error
this.get('session').authenticate(authStrategy, data).catch(function (err) {
self.toggleProperty('loggingIn');
if (err.errors) {