Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/protectedApi_v8/user/profile-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { extractUserIdFromRequest, extractUserToken } from '../../utils/requestE

const API_END_POINTS = {
createOSUserRegistry: (userId: string) => `${CONSTANTS.NETWORK_HUB_SERVICE_BACKEND}/v1/user/create/profile?userId=${userId}`,
createSb: `${CONSTANTS.LEARNER_SERVICE_API_BASE}/v3/user/create`,
createSb: `${CONSTANTS.KONG_API_BASE}/user/v3/create`,
createUserRegistry: `${CONSTANTS.USER_PROFILE_API_BASE}/public/v8/profileDetails/createUserRegistry`,
getMasterLanguages: `${CONSTANTS.USER_PROFILE_API_BASE}/public/v8/profileDetails/getMasterLanguages`,
getMasterNationalities: `${CONSTANTS.USER_PROFILE_API_BASE}/public/v8/profileDetails/getMasterNationalities`,
Expand Down Expand Up @@ -232,6 +232,11 @@ profileDeatailsApi.post('/createUser', async (req, res) => {
const response = await axios({
...axiosRequestConfig,
data: { request: sbUserProfile },
headers: {
Authorization: CONSTANTS.SB_API_KEY,
// tslint:disable-next-line: all
'x-authenticated-user-token': extractUserToken(req),
},
method: 'POST',
url: API_END_POINTS.createSb,
})
Expand Down Expand Up @@ -363,6 +368,11 @@ profileDeatailsApi.post('/createUserV2WithRegistry', async (req, res) => {
const response = await axios({
...axiosRequestConfig,
data: { request: sbUserProfile },
headers: {
Authorization: CONSTANTS.SB_API_KEY,
// tslint:disable-next-line: all
'x-authenticated-user-token': extractUserToken(req),
},
method: 'POST',
url: API_END_POINTS.createSb,
})
Expand Down Expand Up @@ -446,6 +456,11 @@ profileDeatailsApi.post('/createUserV2WithoutRegistry', async (req, res) => {
const response = await axios({
...axiosRequestConfig,
data: { request: sbUserProfile },
headers: {
Authorization: CONSTANTS.SB_API_KEY,
// tslint:disable-next-line: all
'x-authenticated-user-token': extractUserToken(req),
},
method: 'POST',
url: API_END_POINTS.createSb,
})
Expand Down
4 changes: 0 additions & 4 deletions src/utils/test.ts

This file was deleted.