0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/client/app/controllers/settings/code-injection.js
2016-01-19 07:03:27 -06:00

19 lines
458 B
JavaScript

import Ember from 'ember';
import SettingsSaveMixin from 'ghost/mixins/settings-save';
const {
Controller,
inject: {service}
} = Ember;
export default Controller.extend(SettingsSaveMixin, {
notifications: service(),
save() {
let notifications = this.get('notifications');
return this.get('model').save().catch((error) => {
notifications.showAPIError(error, {key: 'code-injection.save'});
});
}
});