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:
commit
fb1fb11afb
1 changed files with 5 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue