Skip to content

Commit 0813437

Browse files
committed
fix:updated naming for hosting url
Signed-off-by: Amitkanswal <[email protected]>
1 parent 32c27fa commit 0813437

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ declare interface ICommonInitData {
103103
type: LocationType;
104104
user: User;
105105
manifest?: Manifest;
106-
serviceDomainUrls?: ServiceURLsMap;
106+
serviceEndpoints?: ServiceURLsMap;
107107
}
108108

109109
export declare interface IOrgFullPageLocationInitData extends ICommonInitData {

src/uiLocation.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class UiLocation {
7171
private config: GenericObjectType;
7272

7373

74-
readonly hostedEndpoints: ServiceURLsMap
74+
readonly endpoints: ServiceURLsMap
7575

7676
/**
7777
* This holds the instance of Cross-domain communication library for posting messages between windows.
@@ -188,9 +188,8 @@ class UiLocation {
188188

189189
this.modal = new Modal();
190190

191-
this.region = formatAppRegion(initializationData.region);
192-
193-
this.hostedEndpoints = initializationData.serviceDomainUrls ?? { CMA: '' };
191+
this.region = formatAppRegion(initializationData.region);
192+
this.endpoints = initializationData.serviceEndpoints ?? { CMA: '' };
194193

195194
const stack = new Stack(initializationData.stack, postRobot, {
196195
currentBranch: initializationData.currentBranch,
@@ -482,7 +481,7 @@ class UiLocation {
482481
* Method used to make an API request to the Contentstack's CMA APIs.
483482
*/
484483

485-
api = (url: string, option?: RequestInitConfig): Promise<Response> => dispatchApiRequest(url,this.hostedEndpoints, option) as Promise<Response>;
484+
api = (url: string, option?: RequestInitConfig): Promise<Response> => dispatchApiRequest(url,this.endpoints, option) as Promise<Response>;
486485

487486
/**
488487
* Method used to create an adapter for management sdk.

0 commit comments

Comments
 (0)