Skip to content

Commit

Permalink
Fixed bug in generating backoffice url for BE
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiegenthaler committed Jun 15, 2024
1 parent 91909e1 commit d4f8e1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1874,12 +1874,12 @@ class stbPlatform {
this.log("Retrieving config for countryCode %s", countryCode);

// https://spark-prod-ch.gnp.cloud.sunrisetv.ch/ch/en/config-service/conf/web/backoffice.json
// https://prod.spark.upctv.ch/ch/en/config-service/conf/web/backoffice.json
const ctryCode = countryCode.substr(0, 2);
// https://spark-prod-be.gnp.cloud.telenet.tv/be/en/config-service/conf/web/backoffice.json
// use countryCode.substr(0, 2) to allow be-fr to map to be for the backoffice url
const ctryCodeForUrl = countryCode.substr(0, 2);

//const url = 'https://spark-prod-ch.gnp.cloud.sunrisetv.ch/ch/en/config-service/conf/web/backoffice.json'
// use countryCode.substr(1, 2) for backwards-compatibility to allow be-fr to map to be
const url=countryBaseUrlArray[ctryCode] + '/' + ctryCode + '/en/config-service/conf/web/backoffice.json';
const url=countryBaseUrlArray[countryCode] + '/' + ctryCodeForUrl + '/en/config-service/conf/web/backoffice.json';
if (this.config.debugLevel > 0) { this.log.warn('getConfig: GET %s', url); }
axiosWS.get(url)
.then(response => {
Expand Down

0 comments on commit d4f8e1d

Please sign in to comment.