mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03: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.
24 lines
546 B
JavaScript
24 lines
546 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.Controller.extend({
|
|
notifications: Ember.inject.service(),
|
|
|
|
acceptEncoding: 'image/*',
|
|
|
|
actions: {
|
|
confirmAccept: function () {
|
|
var notifications = this.get('notifications');
|
|
|
|
this.get('model').save().then(function (model) {
|
|
return model;
|
|
}).catch(function (err) {
|
|
notifications.showAPIError(err);
|
|
});
|
|
},
|
|
|
|
confirmReject: function () {
|
|
return false;
|
|
}
|
|
}
|
|
});
|