Merge branch 'master' into search-pin

search-pin
Mathis FRAMIT 4 months ago
commit ce6a91b160

@ -61,7 +61,9 @@
</button> </button>
</div> </div>
<!-- Modal body --> <!-- Modal body -->
<div class="p-4 md:p-5"> <div
class="p-4 md:p-5"
*ngIf="isLoginModalOpen">
<form [formGroup]="userForm" class="space-y-4"> <form [formGroup]="userForm" class="space-y-4">
<div> <div>
<label <label

@ -63,7 +63,9 @@
</button> </button>
</div> </div>
<!-- Modal body --> <!-- Modal body -->
<div class="p-4 md:p-5"> <div
class="p-4 md:p-5"
*ngIf="isRegisterModalOpen">
<form [formGroup]="userForm" class="space-y-4"> <form [formGroup]="userForm" class="space-y-4">
<div> <div>
<label <label

@ -13,7 +13,7 @@ export class PinService {
filteredPins: Pin[] = []; filteredPins: Pin[] = [];
private apiURL = environment.apiURL; private apiURL = environment.apiURL;
private token = localStorage.getItem('auth_token');
constructor( constructor(
private http: HttpClient, private http: HttpClient,
private autoCompleteService: AutocompleteService private autoCompleteService: AutocompleteService
@ -23,7 +23,7 @@ export class PinService {
const url = `${this.apiURL}/pins`; const url = `${this.apiURL}/pins`;
const headers = new HttpHeaders({ const headers = new HttpHeaders({
'Content-Type': 'application/json', 'Content-Type': 'application/json',
Authorization: 'Bearer ' + this.token, Authorization: 'Bearer ' + localStorage.getItem('auth_token'),
}); });
return this.http.get<any>(url, { headers }); return this.http.get<any>(url, { headers });
} }
@ -37,7 +37,7 @@ export class PinService {
const url = `${this.apiURL}/pin/add`; const url = `${this.apiURL}/pin/add`;
const headers = new HttpHeaders({ const headers = new HttpHeaders({
'Content-Type': 'application/json', 'Content-Type': 'application/json',
Authorization: 'Bearer ' + this.token, Authorization: 'Bearer ' + localStorage.getItem('auth_token'),
}); });
return this.autoCompleteService.getAdressCoordinates(pin.location).pipe( return this.autoCompleteService.getAdressCoordinates(pin.location).pipe(
switchMap((response: any) => { switchMap((response: any) => {

Loading…
Cancel
Save