Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Fix redirect url. #299

Merged
merged 1 commit into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/common/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/GithubController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down