Commit 6ebefbf1 authored by Sourav Dey's avatar Sourav Dey
Browse files

Issue #SB-9180 feat: adding content service base url

parent 6d403c2a
master dependabot/npm_and_yarn/src/async-2.6.4 dependabot/npm_and_yarn/src/decode-uri-component-0.2.2 dependabot/npm_and_yarn/src/flat-and-mocha-5.0.2 dependabot/npm_and_yarn/src/handlebars-4.7.7 dependabot/npm_and_yarn/src/jsonwebtoken-9.0.0 dependabot/npm_and_yarn/src/lodash-4.17.21 dependabot/npm_and_yarn/src/minimist-and-project-sunbird/telemetry-sdk-and-handlebars-and-mkdirp-1.2.8 release-3.6.0 release-4.3.0 release-4.8.0 release-5.2.0 release-5.3.0 release-5.6.0 release-6.0.0 v1.13.3 v1.13 v1.12 tmp-testPR tmp-sunbird-bootcamp tmp-rjshrjndrn-patch-1 tmp-revert-118-testPR tmp-revert-110-logs tmp-revert-99-revert-98-revert-97-revert-96-rjshrjndrn-patch-1 tmp-revert-98-revert-97-revert-96-rjshrjndrn-patch-1 tmp-revert-97-revert-96-rjshrjndrn-patch-1 tmp-revert-96-rjshrjndrn-patch-1 tmp-release-sonarcloud tmp-release-2.6.0 tmp-release-2.3.0 tmp-release-2.1.1 tmp-release-2.1.0 tmp-release-2.1.0_pluginSearch tmp-release-2.0.0 tmp-release-1.15 tmp-release-1.14.3 tmp-release-1.14 tmp-release-1.14-sp3 tmp-refactored-dev-deploy tmp-master tmp-loadtest tmp-load-testing tmp-jenkins-test tmp-jenkins-pipeline tmp-final-variable-refac tmp-dial-assemble-api tmp-content-update-read tmp-circleci release-5.6.0_RC1 release-5.2.0_RC1 release-4.8.5_RC1 release-4.8.0_RC2 release-4.8.0_RC1 release-4.3.0_RC1 release-3.8.0_RC3 release-3.8.0_RC2 release-3.8.0_RC1 release-3.7.0_RC2 release-3.7.0_RC1 release-3.6.0_RC1 release-3.2.0_RC2 release-3.2.0_RC1 release-3.1.0 release-3.1.0_RC2 release-3.1.0_RC1 release-3.0.1_RC1 release-3.0.0 release-3.0.0_RC1 release-2.10.0 release-2.10.0_RC2 release-2.10.0_RC1 release-2.9.0_RC3 release-2.9.0_RC2 release-2.9.0_RC1 release-2.8.0 release-2.8.0_RC4 release-2.8.0_RC3 release-2.8.0_RC2 release-2.8.0_RC1 release-2.7.0 release-2.7.0_RC2 release-2.7.0_RC1 release-2.6.0 release-2.6.0_RC4 release-2.6.0_RC3 release-2.6.0_RC2 release-2.6.0_RC1 release-2.3.0 release-2.3.0_RC2 release-2.3.0_RC1 release-2.1.1_RC1 release-2.1.0_RC2 release-2.1.0_RC1 release-2.0.0 release-2.0.0_RC5 release-2.0.0_RC4 release-2.0.0_RC3 release-2.0.0_RC2 release-2.0.0_RC1 release-1.15.0 release-1.15_RC7 release-1.15_RC6 release-1.15_RC5 release-1.15_RC4 release-1.15_RC3 release-1.15_RC2 release-1.15_RC1 release-1.14.0
No related merge requests found
Showing with 3 additions and 1 deletion
+3 -1
......@@ -48,6 +48,7 @@ const languageServiceApiKey = process.env.sunbird_language_service_api_key
const producerId = process.env.sunbird_environment + '.' + process.env.sunbird_instance + '.content-service'
const sunbirdPortalBaseUrl = process.env.sunbird_portal_base_url || 'https://staging.open-sunbird.org'
const lockExpiryTime = process.env.sunbird_lock_expiry_time || 1800
const contentServiceLocalBaseUrl = process.env.sunbird_content_service_local_base_url ? process.env.sunbird_content_service_local_base_url : 'http://content_service_content_service:5000'
configUtil.setContentProviderApi(contentProviderApiConfig.API)
configUtil.setConfig('CONTENT_REPO_BASE_URL', contentRepoBaseUrl)
......@@ -69,6 +70,7 @@ configUtil.setConfig('LANGUAGE_SERVICE_BASE_URL', languageServiceBaseUrl)
configUtil.setConfig('LANGUAGE_SERVICE_AUTHORIZATION_TOKEN', 'Bearer ' + languageServiceApiKey)
configUtil.setConfig('SUNBIRD_PORTAL_BASE_URL', sunbirdPortalBaseUrl)
configUtil.setConfig('LOCK_EXPIRY_TIME', lockExpiryTime)
configUtil.setConfig('CONTENT_SERVICE_LOCAL_BASE_URL', contentServiceLocalBaseUrl)
process.env.sunbird_cassandra_urls = process.env.sunbird_cassandra_urls || '127.0.0.1'
process.env.dial_code_image_temp_folder = 'temp'
......
......@@ -388,7 +388,7 @@ function checkResourceTypeValidation (req, CBW) {
switch (lodash.lowerCase(req.body.request.resourceType)) {
case 'content':
var httpOptions = {
url: configUtil.getConfig('SUNBIRD_PORTAL_BASE_URL') + '/api/v1/content/getContentLockValidation',
url: configUtil.getConfig('CONTENT_SERVICE_LOCAL_BASE_URL') + '/v1/content/getContentLockValidation',
headers: req.headers,
method: 'POST',
body: req.body,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment