Skip to content

Commit

Permalink
change hostname and remove http block
Browse files Browse the repository at this point in the history
  • Loading branch information
Shulammite-Aso committed Feb 19, 2022
1 parent 8c3feed commit ea71364
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions components/dashboard/src/settings/Integrations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -548,16 +548,14 @@ export function GitIntegrationModal(props: ({
const updateHostValue = (host: string) => {
if (mode === "new") {

let verifiedHost = host;
let newHostValue = host;

if (host.startsWith("https://")) {
verifiedHost = host.replace("https://","");
} else if (host.startsWith("http://")) {
verifiedHost = host.replace("http://","");
newHostValue = host.replace("https://","");
}

setHost(verifiedHost);
setRedirectURL(callbackUrl(verifiedHost));
setHost(newHostValue);
setRedirectURL(callbackUrl(newHostValue));
setErrorMessage(undefined);
}
}
Expand Down

0 comments on commit ea71364

Please sign in to comment.