mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
739b57e05b
Closes #3357 - API method User#edit now handles User objects that have either an array of Role ids or objects. - Fixed error handler notification on upload modal controller.
23 lines
546 B
JavaScript
23 lines
546 B
JavaScript
|
|
var UploadController = Ember.Controller.extend({
|
|
acceptEncoding: 'image/*',
|
|
actions: {
|
|
confirmAccept: function () {
|
|
var self = this;
|
|
|
|
this.get('model').save().then(function (model) {
|
|
self.notifications.showSuccess('Saved');
|
|
return model;
|
|
}).catch(function (err) {
|
|
self.notifications.showErrors(err);
|
|
});
|
|
},
|
|
|
|
confirmReject: function () {
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
|
|
export default UploadController;
|