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