1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00

Invited user can sign up successfully

issue #5525
- add `DS.Errors` to `signup` model
- add check for errors: run `showErrors` method only if errors are defined, like in `signin` controller
This commit is contained in:
Rem Zolotykh 2015-07-08 11:56:07 +02:00
parent e9c499dc09
commit 4cce1dfbcd
2 changed files with 5 additions and 1 deletions

View file

@ -45,7 +45,9 @@ export default Ember.Controller.extend(ValidationEngine, {
});
}).catch(function (errors) {
self.toggleProperty('submitting');
notifications.showErrors(errors);
if (errors) {
notifications.showErrors(errors);
}
});
}
}

View file

@ -1,4 +1,5 @@
import Ember from 'ember';
import DS from 'ember-data';
import {request as ajax} from 'ic-ajax';
import Configuration from 'simple-auth/configuration';
import styleBody from 'ghost/mixins/style-body';
@ -35,6 +36,7 @@ export default Ember.Route.extend(styleBody, {
model.set('email', email);
model.set('token', params.token);
model.set('errors', DS.Errors.create());
return ajax({
url: self.get('ghostPaths.url').api('authentication', 'invitation'),