MCPcopy
hub / github.com/harness/harness / getConfig

Function getConfig

web/src/services/config.ts:21–33  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

19import SessionToken from 'utils/SessionToken'
20
21export 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
35export interface GetUsingFetchProps<
36 _TData = any,

Callers 15

App.tsxFile · 0.90
AdminListUsersFunction · 0.90
useAdminListUsersFunction · 0.90
AdminCreateUserFunction · 0.90
useAdminCreateUserFunction · 0.90
AdminDeleteUserFunction · 0.90
useAdminDeleteUserFunction · 0.90
AdminGetUserFunction · 0.90
useAdminGetUserFunction · 0.90
AdminUpdateUserFunction · 0.90
useAdminUpdateUserFunction · 0.90
UpdateUserAdminFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…