1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00

Merge pull request #713 from kevinansfield/fix-post-import-errors

🐛 fix errors when navigating after successful import
This commit is contained in:
David Wolfe 2017-05-24 12:39:41 +01:00 committed by GitHub
commit fb1fb11afb

View file

@ -21,6 +21,7 @@ export default Controller.extend({
ghostPaths: injectService(),
notifications: injectService(),
session: injectService(),
settings: injectService(),
ajax: injectService(),
// TODO: convert to ember-concurrency task
@ -111,8 +112,12 @@ export default Controller.extend({
run.schedule('destroy', this, () => {
// Reload currentUser and set session
this.set('session.user', store.findRecord('user', currentUserId));
// TODO: keep as notification, add link to view content
notifications.showNotification('Import successful.', {key: 'import.upload.success'});
// reload settings
return this.get('settings').reload();
});
}).catch((response) => {
if (isUnsupportedMediaTypeError(response)) {