mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
6c5d1a6267
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;
|