Skip to content

Commit

Permalink
Merge pull request #39 from deepali-chavhan/appliance-2.0
Browse files Browse the repository at this point in the history
Task #0000 fix: Changes done in login component for virtual id api
  • Loading branch information
gouravmore authored Jun 24, 2024
2 parents a58e057 + 739a61e commit 072db5b
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/app/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,17 @@ export class LoginComponent implements OnInit {

localStorage.clear();

this.http.get<any>(
"https://www.learnerai-dev.theall.ai/v1/vid/generateVirtualID",
{ params: { username ,password} }
this.http.post<any>(
`https://www.learnerai-dev.theall.ai/all-orchestration-services/api/virtualId/generateVirtualID?username=${username}`,
null
).subscribe(
(response) => {
if(response){
if (response.virtualID) {
localStorage.setItem("profileName", username);
localStorage.setItem("virtualId", response.virtualID);
localStorage.setItem("contentSessionId", uuidv4());
this.router.navigate(['/ta']);
}
}
else {
if (response && response.result.virtualID) {
localStorage.setItem("profileName", username);
localStorage.setItem("virtualId", response.result.virtualID);
localStorage.setItem("contentSessionId", uuidv4());
this.router.navigate(['/ta']);
} else {
alert("Enter correct username and password");
}
},
Expand Down

0 comments on commit 072db5b

Please sign in to comment.