Oviya commited on
Commit ·
4e121c9
1
Parent(s): 1202633
add vocabularybuilder
Browse files5 unmodified lines678991011121314152 unmodified lines1819201819202122232425262728292122235 unmodified lines providedIn: 'root'})export class VocabularyBuilderService { private baseUrl: string = 'http://127.0.0.1:5002'; // Update the URL if needed
private baseUrl = location.hostname.endsWith('hf.space') ? 'https://pykara-py-learn-backend.hf.space/media' : 'http://localhost:5000/media'; constructor(private http: HttpClient) { }
// Fetch vocabulary word and related options2 unmodified lines }
// ✅ Fix: Add this missing method //getFeedback(): Observable<any> { // return this.http.get<any>(`${this.baseUrl}/get-feedback`); // Ensure your backend has this endpoint //}
//getSentenceFeedback(): Observable<any> { // return this.http.get<any>(`${this.baseUrl}/get-sentence-feedback`); // Ensure this API exists in backend //}
// Validate the user's selected words validateSelection(word: string, selectedWords: string[], allOptions: string[]): Observable<any> { // Construct the request bodysrc/app/vocabulary-builder/vocabulary-builder.service.ts+4-13