2015-02-13 07:22:32 +03:00
|
|
|
import Ember from 'ember';
|
2015-08-10 18:43:49 +03:00
|
|
|
import SettingsSaveMixin from 'ghost/mixins/settings-save';
|
2015-05-26 05:10:50 +03:00
|
|
|
|
2015-08-10 18:43:49 +03:00
|
|
|
export default Ember.Controller.extend(SettingsSaveMixin, {
|
2015-06-13 17:34:09 +03:00
|
|
|
notifications: Ember.inject.service(),
|
|
|
|
|
2015-08-10 18:43:49 +03:00
|
|
|
save: function () {
|
|
|
|
var notifications = this.get('notifications');
|
2014-07-31 23:36:20 +04:00
|
|
|
|
2015-08-10 18:43:49 +03:00
|
|
|
return this.get('model').save().catch(function (error) {
|
|
|
|
notifications.showAPIError(error);
|
|
|
|
});
|
2014-07-31 23:36:20 +04:00
|
|
|
}
|
|
|
|
});
|