Ghost/core/client/controllers/modals/upload.js
Jason Williams 739b57e05b Update Users API to handle role objects or ids
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.
2014-07-22 05:48:16 +00:00

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;