(str: string)
| 19 | import SessionToken from 'utils/SessionToken' |
| 20 | |
| 21 | export const getConfig = (str: string): string => { |
| 22 | // 'code/api/v1' -> 'api/v1' (standalone) |
| 23 | // -> 'code/api/v1' (embedded inside Harness platform) |
| 24 | if (window.STRIP_CODE_PREFIX) { |
| 25 | str = str.replace(/^code\//, '') |
| 26 | } |
| 27 | |
| 28 | if (window.STRIP_CDE_PREFIX) { |
| 29 | str = str.replace(/^cde\//, '') |
| 30 | } |
| 31 | |
| 32 | return window.apiUrl ? `${window.apiUrl}/${str}` : `${window.harnessNameSpace || ''}/${str}` |
| 33 | } |
| 34 | |
| 35 | export interface GetUsingFetchProps< |
| 36 | _TData = any, |
no outgoing calls
no test coverage detected
searching dependent graphs…