diff --git a/src/common/constants.js b/src/common/constants.js index dce65c3..ec0bb87 100644 --- a/src/common/constants.js +++ b/src/common/constants.js @@ -52,8 +52,8 @@ const GITLAB_REFRESH_TOKEN_BEFORE_EXPIRATION = 300; const GITHUB_OWNER_CALLBACK_URL = '/api/v1/github/owneruser/callback'; const GITLAB_OWNER_CALLBACK_URL = '/api/v1/gitlab/owneruser/callback'; -const OWNER_USER_LOGIN_SUCCESS_URL = '/#/app/settings'; -const USER_ADDED_TO_TEAM_SUCCESS_URL = '/#/members'; +const OWNER_USER_LOGIN_SUCCESS_URL = '/#!/app/settings'; +const USER_ADDED_TO_TEAM_SUCCESS_URL = '/#!/members'; const TC_LOGIN_CALLBACK_URL = '/api/v1/tclogin'; const JWT_V3_NAME = 'v3jwt'; diff --git a/src/controllers/GithubController.js b/src/controllers/GithubController.js index f7cf9b8..8421eea 100644 --- a/src/controllers/GithubController.js +++ b/src/controllers/GithubController.js @@ -196,7 +196,7 @@ async function addUserToTeamCallback(req, res) { // check if user is already in the team or not yet if (githubUser.state === 'active') { // redirect user to the success page, to let user know that he is already in the team - const url = `${teamDetails.organization.login}_${teamDetails.name}`; + const url = `${teamDetails.organization.login}_${teamDetails.name.replace(/ /g, '-')}`; res.redirect(`${constants.USER_ADDED_TO_TEAM_SUCCESS_URL}/github/${url}`); } else { // redirect user to organization invitation page