Skip to content

Commit 698445a

Browse files
Merge pull request #226 from sunbird-cb/phone-no-add
Phone no add
2 parents 2035f1b + 343c767 commit 698445a

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

src/protectedApi_v8/cohorts.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ function getUsers(userprofile: IUserProfile): ICohortsUser {
333333

334334
return {
335335
city: '',
336-
//department: userprofile.channel === undefined ? '' : userprofile.channel,
336+
// department: userprofile.channel === undefined ? '' : userprofile.channel,
337337
department: userprofile.rootOrgName === undefined ? '' : userprofile.rootOrgName,
338338
desc: '',
339339
designation: designationValue,

src/protectedApi_v8/user/profile-details.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,14 @@ profileDeatailsApi.post('/createUser', async (req, res) => {
237237
const userRoles = (req.body.personalDetails.roles) ? req.body.personalDetails.roles : undefined
238238
let sbUserProfile: Partial<ISBUser> = {
239239
channel: sbChannel, email: sbemail_, emailVerified: sbemailVerified_,
240-
firstName: sbfirstName_, phone: sbphone_, roles: userRoles,
240+
firstName: sbfirstName_, phone: sbphone_, roles: userRoles,
241241
}
242242
if (sbphone_ === undefined || sbphone_ === '') {
243243
sbUserProfile = _.omit(sbUserProfile, 'phone')
244244
}
245245
if (userRoles === undefined) {
246246
sbUserProfile = _.omit(sbUserProfile, 'roles')
247-
}
248-
else {
247+
} else {
249248
const roleExist = isMdoLeaderExist(userRoles, 'MDO_LEADER')
250249
if (roleExist) {
251250
const roleCheckResp = await axios({

src/utils/proxyCreator.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ export function proxyAssessmentRead(route: Router, targetUrl: string, _timeout =
312312
let url = removePrefix(`${PROXY_SLUG}/assessment/read`, req.originalUrl)
313313
// Check if the target URL already contains query parameters
314314
if (url.includes('?')) {
315-
url = targetUrl + url + '&hierarchy=detail';
315+
url = targetUrl + url + '&hierarchy=detail'
316316
} else {
317-
url = targetUrl + url + '?hierarchy=detail';
318-
}
317+
url = targetUrl + url + '?hierarchy=detail'
318+
}
319319
// tslint:disable-next-line: no-console
320320
console.log('REQ_URL_UPDATED proxyAssessmentRead', url)
321321
proxy.web(req, res, {
@@ -331,11 +331,11 @@ export function proxyQuestionRead(route: Router, targetUrl: string, _timeout = 1
331331
route.all('/*', (req, res) => {
332332
if (!targetUrl.includes('?')) {
333333
// Split the URL into base URL and query parameters
334-
const [, queryParams] = req.originalUrl.split('?');
334+
const [, queryParams] = req.originalUrl.split('?')
335335
// Construct the final target URL by appending query parameters
336-
targetUrl = targetUrl + (queryParams ? `?${queryParams}` : '');
336+
targetUrl = targetUrl + (queryParams ? `?${queryParams}` : '')
337337
}
338-
// tslint:disable-next-line: no-console
338+
// tslint:disable-next-line: no-console
339339
console.log('REQ_URL_UPDATED proxyAssessmentRead', targetUrl)
340340
proxy.web(req, res, {
341341
changeOrigin: true,

0 commit comments

Comments
 (0)