Skip to content

Commit

Permalink
Issue #SB-28693 merge: Merge pull request Sunbird-Knowlg#276 from Jay…
Browse files Browse the repository at this point in the history
…aprakash8887/SB-28693

Issue #SB-28693 feat: DIAL Code Context Info APIs
  • Loading branch information
vinukumar-vs authored Mar 24, 2022
2 parents 23d96e7 + 513b7ab commit 05dbd47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions src/routes/dialCodeRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ module.exports = function (app) {
requestMiddleware.createAndValidateRequestBody, requestMiddleware.checkChannelID,
dialCodeService.getDialCodeAPI)

app.route(BASE_URL_V2 + '/read')
.post(healthService.checkDependantServiceHealth(dependentServiceHealth),
requestMiddleware.gzipCompression(),
requestMiddleware.createAndValidateRequestBody, requestMiddleware.checkChannelID,
dialCodeService.getDialCodeV2API)
app.route(BASE_URL_V2 + '/read/:dialCodeId')
.get(healthService.checkDependantServiceHealth(dependentServiceHealth),
requestMiddleware.createAndValidateRequestBody, dialCodeService.getDialCodeV2API)

app.route(BASE_URL + '/update/:dialCodeId')
.patch(healthService.checkDependantServiceHealth(dependentServiceHealth),
Expand Down
6 changes: 2 additions & 4 deletions src/service/dialCodeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,7 @@ function getDialCodeAPI (req, response) {
function getDialCodeV2API (req, response) {
logger.info("dialCodeService.js:: getDialCodeV2API function invoked!")
var data = {}
data.body = req.body
data.dialCodeId = _.get(req, 'body.request.dialcode.identifier')
data.dialCodeId = req.params.dialCodeId
var rspObj = req.rspObj
// Adding objectData in telemetryData object
if (rspObj.telemetryData) {
Expand Down Expand Up @@ -632,8 +631,7 @@ function getDialCodeV2API (req, response) {
logger.debug({
msg: 'Request to get dialcode context info',
additionalInfo: {
dialCodeId: data.dialCodeId,
qs: data.queryParams
dialCodeId: data.dialCodeId
}
}, req)
contentProvider.getDialCodeV2(data.dialCodeId, req.headers, function (err, res) {
Expand Down

0 comments on commit 05dbd47

Please sign in to comment.