Début d'ajout pour la gestion du login
This commit is contained in:
@@ -8,13 +8,13 @@ import { AircraftResp, AircraftReq } from '../models/aircraft';
|
||||
export class AircraftService {
|
||||
|
||||
private readonly headers = new HttpHeaders({
|
||||
'Access-Control-Allow-Origin': environment.urlApi
|
||||
'Access-Control-Allow-Origin': environment.apiUrl
|
||||
});
|
||||
constructor(private http: HttpClient) { }
|
||||
|
||||
public getListOfAircrafts(): Observable<Array<AircraftResp>> {
|
||||
return this.http.get<Array<AircraftResp>>(
|
||||
`${environment.urlApi}/api/Aircraft`,
|
||||
`${environment.apiUrl}/api/Aircraft`,
|
||||
{ headers: this.headers }
|
||||
);
|
||||
}
|
||||
@@ -26,7 +26,7 @@ export class AircraftService {
|
||||
};
|
||||
|
||||
this.http
|
||||
.post(`${environment.urlApi}/api/Aircraft`, bodyNewAircraft, {
|
||||
.post(`${environment.apiUrl}/api/Aircraft`, bodyNewAircraft, {
|
||||
headers: this.headers
|
||||
})
|
||||
.subscribe(data => console.log(data));
|
||||
|
||||
Reference in New Issue
Block a user