mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 09:22:49 +03:00
c5a8a0c860
closes #5903, refs #5409 - switch alert/notification component tests from unit to integration where appropriate - rename `notifications.closeAll` to `notifications.clearAll` to better represent it's behaviour - add concept of a "key" to alerts/notifications and ability to close only specified keys through notifications service - close duplicate alerts/notifications before showing a new one - specify a key for all existing alerts - close failure alerts on successful retries - clear all currently displayed alerts on successful sign-in
15 lines
436 B
JavaScript
15 lines
436 B
JavaScript
import Ember from 'ember';
|
|
import SettingsSaveMixin from 'ghost/mixins/settings-save';
|
|
|
|
export default Ember.Controller.extend(SettingsSaveMixin, {
|
|
notifications: Ember.inject.service(),
|
|
|
|
save: function () {
|
|
var notifications = this.get('notifications');
|
|
|
|
return this.get('model').save().catch(function (error) {
|
|
notifications.showAPIError(error, {key: 'code-injection.save'});
|
|
});
|
|
}
|
|
});
|