diff options
Diffstat (limited to 'config/router.js')
-rw-r--r-- | config/router.js | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/config/router.js b/config/router.js index 75f6ab58..d4d13be5 100644 --- a/config/router.js +++ b/config/router.js @@ -80,19 +80,16 @@ FlowRouter.route('/shortcuts', { }, }); -FlowRouter.route('/import', { +FlowRouter.route('/import/:source', { name: 'import', - triggersEnter: [ - AccountsTemplates.ensureSignedIn, - () => { - Session.set('currentBoard', null); - Session.set('currentCard', null); + triggersEnter: [AccountsTemplates.ensureSignedIn], + action(params) { + Session.set('currentBoard', null); + Session.set('currentCard', null); + Session.set('importSource', params.source); - Filter.reset(); - EscapeActions.executeAll(); - }, - ], - action() { + Filter.reset(); + EscapeActions.executeAll(); BlazeLayout.render('defaultLayout', { headerBar: 'importHeaderBar', content: 'import', @@ -132,6 +129,7 @@ const redirections = { '/boards': '/', '/boards/:id/:slug': '/b/:id/:slug', '/boards/:id/:slug/:cardId': '/b/:id/:slug/:cardId', + '/import': '/import/trello', }; _.each(redirections, (newPath, oldPath) => { |