mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
e21d7ed1f5
issue #5409 `notifications.showErrors` was historically used to display multiple error notifications whether from validation errors or responses form the API. This usage needs to be reviewed as inline validations should handle the validation side and we should be displaying alerts for actual errors. Eventually `notifications.showErrors` should be left unused and therefore removed.
17 lines
441 B
JavaScript
17 lines
441 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.Controller.extend({
|
|
notifications: Ember.inject.service(),
|
|
|
|
actions: {
|
|
save: function () {
|
|
var notifications = this.get('notifications');
|
|
|
|
return this.get('model').save().then(function (model) {
|
|
return model;
|
|
}).catch(function (error) {
|
|
notifications.showAPIError(error);
|
|
});
|
|
}
|
|
}
|
|
});
|