Début d'ajout pour la gestion du login
This commit is contained in:
@@ -9,12 +9,12 @@ import { GearResp, GearReq } from '../models/gear';
|
||||
export class GearService {
|
||||
|
||||
private readonly headers = new HttpHeaders({
|
||||
'Access-Control-Allow-Origin': environment.urlApi
|
||||
'Access-Control-Allow-Origin': environment.apiUrl
|
||||
});
|
||||
constructor(private http: HttpClient) { }
|
||||
|
||||
public getListOfGears(): Observable<Array<GearResp>> {
|
||||
return this.http.get<Array<GearResp>>(`${environment.urlApi}/api/Gear`, {
|
||||
return this.http.get<Array<GearResp>>(`${environment.apiUrl}/api/Gear`, {
|
||||
headers: this.headers
|
||||
});
|
||||
}
|
||||
@@ -38,7 +38,7 @@ export class GearService {
|
||||
};
|
||||
|
||||
this.http
|
||||
.post(`${environment.urlApi}/api/Gear`, bodyNewGear, {
|
||||
.post(`${environment.apiUrl}/api/Gear`, bodyNewGear, {
|
||||
headers: this.headers
|
||||
})
|
||||
.subscribe(data => console.log(data));
|
||||
|
||||
Reference in New Issue
Block a user