Skip to content

Commit

Permalink
fix orcid base url fix
Browse files Browse the repository at this point in the history
  • Loading branch information
auumgn committed Aug 6, 2024
1 parent 11654a4 commit 30edd7b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ui/src/app/app.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,16 @@ export function emailValidator(control: FormControl): { [key: string]: any } | n
}
return null
}
const environment = window.location.hostname.replace('member-portal.', '').replace('.orcid.org', '')
export const ORCID_BASE_URL = 'https://' + environment + '.orcid.org'

let environment = ''
if (window.location.hostname == 'member-portal.qa.orcid.org') {
environment = 'qa'
} else if (window.location.hostname == 'member-portal.sandbox.orcid.org') {
environment = 'sandbox'
}

export const ORCID_BASE_URL = 'https://' + environment + 'orcid.org'

export const BASE_URL = window.location.origin

// eslint-disable-next-line
Expand Down

0 comments on commit 30edd7b

Please sign in to comment.