Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…nto fix/79518/ncert-navigate/dev
  • Loading branch information
pushpamtrigyn committed Oct 31, 2023
2 parents dc3a665 + 2aeb983 commit 1b492b5
Showing 1 changed file with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ export class OtpComponent implements OnInit {
}, []);
const userTypes = [{ type: 'teacher' }];
const locationInfo: any = {
// userId: resp.result.userId,
profileLocation: locationDetails,
profileUserTypes: userTypes,
firstName: createRequest.request.firstName
Expand All @@ -218,31 +217,6 @@ export class OtpComponent implements OnInit {
createRequest.request['reqData'] = _.get(data, 'reqData');
if (this.otpForm.controls.tncAccepted.value && this.otpForm.controls.tncAccepted.status === 'VALID') {
this.signupService.createUserV3(createRequest).subscribe((resp: ServerResponse) => {
if(resp.responseCode=== 'OK' && resp.result.userId) {
const locationDetails: SbLocation[] = Object.keys(_.get(this.startingForm, 'onboardingInfo.children.persona'))
.reduce<SbLocation[]>((acc, key) => {
const locationDetail: SbLocation | null = _.get(this.startingForm, 'onboardingInfo.children.persona')[key];
if (_.get(locationDetail, 'code')) {
acc.push(locationDetail);
}
return acc;
}, []);
const userTypes = [{ type: 'teacher' }];
const payload: any = {
userId: resp.result.userId,
profileLocation: locationDetails,
profileUserTypes: userTypes,
firstName: createRequest.request.firstName

};
this.locationService.updateProfile(payload).toPromise()
.then((res) => {
this.toasterService.success(this.resourceService?.messages?.smsg?.m0057);
}).catch((err) => {
console.log("Error for location selection", err);
this.toasterService.error(this.resourceService?.messages?.emsg?.m0005);
});
}
this.telemetryLogEvents('sign-up', true);
const tncAcceptRequestBody = {
request: {
Expand Down

0 comments on commit 1b492b5

Please sign in to comment.