{"action":"opened","issue":{"url":"https://api.github.com/repos/m0n0l0c0/electron-router/issues/5","repository_url":"https://api.github.com/repos/m0n0l0c0/electron-router","labels_url":"https://api.github.com/repos/m0n0l0c0/electron-router/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/m0n0l0c0/electron-router/issues/5/comments","events_url":"https://api.github.com/repos/m0n0l0c0/electron-router/issues/5/events","html_url":"https://github.com/m0n0l0c0/electron-router/issues/5","id":320094733,"number":5,"title":"Can not do redirect ","user":{"login":"gasparyanyur","id":23028748,"avatar_url":"https://avatars0.githubusercontent.com/u/23028748?v=4","gravatar_id":"","url":"https://api.github.com/users/gasparyanyur","html_url":"https://github.com/gasparyanyur","followers_url":"https://api.github.com/users/gasparyanyur/followers","following_url":"https://api.github.com/users/gasparyanyur/following{/other_user}","gists_url":"https://api.github.com/users/gasparyanyur/gists{/gist_id}","starred_url":"https://api.github.com/users/gasparyanyur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasparyanyur/subscriptions","organizations_url":"https://api.github.com/users/gasparyanyur/orgs","repos_url":"https://api.github.com/users/gasparyanyur/repos","events_url":"https://api.github.com/users/gasparyanyur/events{/privacy}","received_events_url":"https://api.github.com/users/gasparyanyur/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-03T21:59:01Z","updated_at":"2018-05-03T21:59:01Z","closed_at":null,"author_association":"NONE","body":"Hi all. In my `main.js` I have defined routes look like this\r\n```\r\nrouter.on('ready', () => {\r\n        router.on('quit', () => {\r\n        });\r\n        router.on('register', (req, res) => {\r\n            showTemplate(APP.Templates.Register);\r\n        });\r\n        router.on('login', (req, res) => {\r\n            showTemplate(APP.Templates.Login);\r\n        });\r\n        router.on('logout', (req, res) => {\r\n            storage.delete(API.UserIDKey);\r\n            storage.delete(API.UserTokenKey);\r\n            API_USER = {};\r\n            router.send('login');\r\n        });\r\n        router.on('dashboard', (req, res) => {\r\n            console.log(1);\r\n            showTemplate(APP.Templates.Dashboard)\r\n        });\r\n        router.on('accounts', (req, res) => {\r\n            getDashboard();\r\n        });\r\n    });\r\n```\r\n\r\nThan I am checking ,if the user has logined than redirect to the dashboard route\r\n```\r\nif (typeof API_USER.token !== 'undefined' && typeof API_USER.id !== 'undefined') {\r\n        router.send('dashboard');\r\n    } \r\n```\r\n\r\nBut the route sending is not working. Please help!"}}
{"actor":{"display_login":"gasparyanyur"}}