Skip to content

Commit

Permalink
chore: Update API endpoints to use production URL
Browse files Browse the repository at this point in the history
```
  • Loading branch information
HarshitShukla-dev committed Jul 12, 2024
1 parent 147938b commit 4d603a5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class ChatComponent implements OnInit {

setInterval(() => {
this.http
.get('http://localhost:3000/api/v1/group/getmsgs', {
.get('http://edventure.azurewebsites.net/api/v1/group/getmsgs', {
params: { loggedInUsername: this.loggedInUsername }
})
.subscribe((response: any) => {
Expand All @@ -42,7 +42,7 @@ export class ChatComponent implements OnInit {
} // create the body of the request

this.http
.post('http://localhost:3000/api/v1/group/msgGroup', body)
.post('http://edventure.azurewebsites.net/api/v1/group/msgGroup', body)
.subscribe((response: any) => {})

this.content = '' // clear the input field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class DashboardNavComponent {
constructor(public http: HttpClient, private router: Router) { }

logout() {
this.http.get("http://localhost:3000/api/v1/user/logout",{withCredentials:true}).subscribe(
this.http.get("http://edventure.azurewebsites.net/api/v1/user/logout",{withCredentials:true}).subscribe(
() => {
// Success: delete all cookies for domain 'localhost' and path '/'
// Assuming you're using ngx-cookie-service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class HomeComponent implements OnInit {
}

checkCookie(): void {
this.http.post("http://localhost:3000/api/v1/user/checkCookie", {}, {withCredentials: true}).subscribe(
this.http.post("http://edventure.azurewebsites.net/api/v1/user/checkCookie", {}, {withCredentials: true}).subscribe(
(response: any) => {
if(response.msg == "Log in Success")
this.router.navigate(['/dashboard'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class LoginComponent {
this.body.username = form.value.email;
this.body.password = form.value.password;
this.http
.post('http://localhost:3000/api/v1/user/signin', this.body, {withCredentials: true})
.post('http://edventure.azurewebsites.net/api/v1/user/signin', this.body, {withCredentials: true})
.subscribe((response: any) => {
this.state = response.msg;
if(this.state == "Log In Success"){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class SignupComponent {
this.userData.email = email;
this.setotp.email = email;
this.http
.post('http://localhost:3000/api/v1/user/getotp', body)
.post('http://edventure.azurewebsites.net/api/v1/user/getotp', body)
.subscribe((response: any) => {
this.state = response.msg;
});
Expand All @@ -86,7 +86,7 @@ export class SignupComponent {
this.setotp.method = 'signup';
// Send a request to the server to verify the OTP
this.http
.post('http://localhost:3000/api/v1/user/verifyotp', this.setotp)
.post('http://edventure.azurewebsites.net/api/v1/user/verifyotp', this.setotp)
.subscribe((response: any) => {
console.log(response);
this.state = response.msg;
Expand All @@ -101,7 +101,7 @@ export class SignupComponent {
if (form.valid) {
this.userData.educational_institute = form.value.college;
this.http
.post('http://localhost:3000/api/v1/user/signup', this.userData)
.post('http://edventure.azurewebsites.net/api/v1/user/signup', this.userData)
.subscribe((response: any) => {
this.state = response.msg;
console.log(response)
Expand Down

0 comments on commit 4d603a5

Please sign in to comment.