Skip to content

Commit

Permalink
[ADD] url param
Browse files Browse the repository at this point in the history
  • Loading branch information
KennBro committed Feb 1, 2024
1 parent 44117a3 commit cf8223e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frontend/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Component, TemplateRef, ViewChild, ElementRef, AfterViewChecked } from
import { NbDialogService } from '@nebular/theme';
import { TermDialogComponent } from './components/term-dialog.component';
import { HttpClient } from '@angular/common/http';
import { environment } from '../environments/environment';


@Component({
selector: 'app-root',
Expand Down Expand Up @@ -36,9 +38,12 @@ export class AppComponent {
} else {
this.question = false;

const url = 'http://127.0.0.1:5000/question';
const url = environment.url;
const url_question = url + "/question";
console.log("URL", url_question);

this.httpClient
.post(url, {'question': this.userInput})
.post(url_question, {'question': this.userInput})
.subscribe({
next: this.responseBot,
error: err => console.error('Ops: ', err.message),
Expand Down

0 comments on commit cf8223e

Please sign in to comment.