Skip to content

Commit c128399

Browse files
✨ azure-na region updated
region updated
1 parent e5cf9d7 commit c128399

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/main/java/com/contentstack/sdk/CSHttpConnection.java

-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ public void send() {
184184
private void getService(String requestUrl) throws IOException {
185185
Retrofit retrofit = new Retrofit.Builder().baseUrl(this.endpoint).build();
186186
APIService service = retrofit.create(APIService.class);
187-
// [Removed environment deletion]
188187
this.headers.put(X_USER_AGENT, CLIENT_USER_AGENT);
189188
this.headers.put(CONTENT_TYPE, APPLICATION_JSON);
190189
Response<ResponseBody> response = service.getRequest(requestUrl, this.headers).execute();

src/main/java/com/contentstack/sdk/Stack.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,12 @@ protected void setConfig(Config config) {
4040

4141
if (!config.region.name().isEmpty()) {
4242
String region = config.region.name().toLowerCase();
43-
if (region.equalsIgnoreCase("eu")) { // For the region EU
43+
if (region.equalsIgnoreCase("eu")) {
4444
if (urlDomain.equalsIgnoreCase("cdn.contentstack.io")) {
4545
urlDomain = "cdn.contentstack.com";
4646
}
4747
config.host = region + "-" + urlDomain;
48-
}
49-
if (region.equalsIgnoreCase("azure_na")) { // for the region azure_na
48+
} else if (region.equalsIgnoreCase("azure_na")) {
5049
if (urlDomain.equalsIgnoreCase("cdn.contentstack.io")) {
5150
urlDomain = "cdn.contentstack.com";
5251
}
@@ -488,8 +487,8 @@ public void syncPublishType(PublishType publishType, SyncResultCallBack syncCall
488487
*
489488
*
490489
*/
491-
public void sync(String contentType, Date fromDate, String localeCode, PublishType publishType,
492-
SyncResultCallBack syncCallBack) {
490+
public void sync(
491+
String contentType, Date fromDate, String localeCode, PublishType publishType, SyncResultCallBack syncCallBack) {
493492
String newDate = convertUTCToISO(fromDate);
494493
this.sync(null);
495494
syncParams.put("start_from", newDate);

0 commit comments

Comments
 (0)