2015-02-12 21:22:32 -07:00
|
|
|
import Ember from 'ember';
|
2014-03-31 00:07:05 -04:00
|
|
|
|
2015-05-25 21:10:50 -05:00
|
|
|
export default Ember.Controller.extend({
|
|
|
|
notifications: Ember.inject.service(),
|
|
|
|
|
2014-06-06 10:44:09 -04:00
|
|
|
acceptEncoding: 'image/*',
|
2015-05-25 21:10:50 -05:00
|
|
|
|
2014-06-03 21:10:54 +00:00
|
|
|
actions: {
|
2014-06-20 02:29:49 +00:00
|
|
|
confirmAccept: function () {
|
2015-05-25 21:10:50 -05:00
|
|
|
var notifications = this.get('notifications');
|
2014-06-03 21:10:54 +00:00
|
|
|
|
2014-06-20 02:29:49 +00:00
|
|
|
this.get('model').save().then(function (model) {
|
|
|
|
return model;
|
2014-07-22 05:27:50 +00:00
|
|
|
}).catch(function (err) {
|
2015-07-21 18:56:17 +01:00
|
|
|
notifications.showAPIError(err);
|
2014-07-22 05:27:50 +00:00
|
|
|
});
|
2014-06-20 02:29:49 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
confirmReject: function () {
|
|
|
|
return false;
|
2014-03-31 00:07:05 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|