Skip to content

Commit

Permalink
Issue #SB-22457 merge: Merge pull request #38 from VenkatKadiveti/rel…
Browse files Browse the repository at this point in the history
…ease-3.7.0-groups

Issue #SB-22457 fix: generalization of api for groups
  • Loading branch information
vinukumar-vs authored Feb 15, 2021
2 parents e6c323e + 56af962 commit 3d454d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proxy/proxyUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const { Authorization } = require('../helpers/environmentVariablesHelper');
const { logger } = require('@project-sunbird/logger');
const sbLogger = require('sb_logger_util');
const userCreate = '/discussion/user/v1/create';
const groupCreate = '/discussion/forum/v3/create';
let logObj = {
"eid": "LOG",
"ets": 1518460198146,
Expand Down Expand Up @@ -38,7 +39,7 @@ let error_obj = {
const decorateRequestHeaders = function () {
return function (proxyReqOpts) {
logger.info({message: `adding headers in the request ${proxyReqOpts.path}`});
if (userCreate === proxyReqOpts.path) {
if (userCreate === proxyReqOpts.path || groupCreate === proxyReqOpts.path) {
proxyReqOpts.headers.Authorization = 'Bearer ' + Authorization;
}
return proxyReqOpts;
Expand Down

0 comments on commit 3d454d9

Please sign in to comment.