Début d'ajout pour la gestion du login
This commit is contained in:
@@ -10,13 +10,13 @@ import { DropZoneResp } from '../models/dropzone';
|
||||
export class DropzoneService {
|
||||
|
||||
private readonly headers = new HttpHeaders({
|
||||
'Access-Control-Allow-Origin': environment.urlApi
|
||||
'Access-Control-Allow-Origin': environment.apiUrl
|
||||
});
|
||||
constructor(private http: HttpClient) { }
|
||||
|
||||
public getListOfDropZones(): Observable<Array<DropZoneResp>> {
|
||||
return this.http
|
||||
.get<Array<DropZoneResp>>(`${environment.urlApi}/api/DropZone`, {
|
||||
.get<Array<DropZoneResp>>(`${environment.apiUrl}/api/DropZone`, {
|
||||
headers: this.headers
|
||||
})
|
||||
.pipe(
|
||||
@@ -30,7 +30,7 @@ export class DropzoneService {
|
||||
public SetFavoriteDropZone(selectedDz: DropZoneResp): boolean {
|
||||
selectedDz.isFavorite = true;
|
||||
this.http
|
||||
.put(`${environment.urlApi}/api/DropZone/${selectedDz.id}`, selectedDz, {
|
||||
.put(`${environment.apiUrl}/api/DropZone/${selectedDz.id}`, selectedDz, {
|
||||
headers: this.headers
|
||||
})
|
||||
.subscribe(data => console.log(data));
|
||||
@@ -41,7 +41,7 @@ export class DropzoneService {
|
||||
public RemoveFavoriteDropZone(selectedDz: DropZoneResp): boolean {
|
||||
selectedDz.isFavorite = false;
|
||||
this.http
|
||||
.put(`${environment.urlApi}/api/DropZone/${selectedDz.id}`, selectedDz, {
|
||||
.put(`${environment.apiUrl}/api/DropZone/${selectedDz.id}`, selectedDz, {
|
||||
headers: this.headers
|
||||
})
|
||||
.subscribe(data => console.log(data));
|
||||
|
||||
Reference in New Issue
Block a user