Skip to content

Commit

Permalink
fix feedback url
Browse files Browse the repository at this point in the history
  • Loading branch information
mehul-m-prajapati committed Nov 8, 2024
1 parent 08721f7 commit 78477fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/components/feedback/feedback.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { HttpClient } from '@angular/common/http'; // <-- Import HttpClient
import { Observable } from 'rxjs';
import { environment } from '../../../environments/environment';

interface Feedback {
id: number;
Expand Down Expand Up @@ -88,7 +89,7 @@ export class FeedbackComponent implements OnInit {

// Method to save feedback to the backend
saveFeedback(feedback: Feedback): Observable<any> {
const url = 'http://localhost:5000/api/feedback'; // Replace with your backend API endpoint
return this.http.post(url, feedback);
let apiUrl = `${environment.BACKEND_API_URL}/feedback`;
return this.http.post(apiUrl, feedback);
}
}

0 comments on commit 78477fd

Please sign in to comment.