|
|
@ -29,6 +29,7 @@ export class AddPinService {
|
|
|
|
return this.autoCompleteService.getAdressCoordinates(pin.location).pipe(
|
|
|
|
return this.autoCompleteService.getAdressCoordinates(pin.location).pipe(
|
|
|
|
switchMap((response: any) => {
|
|
|
|
switchMap((response: any) => {
|
|
|
|
const coords: [string, string] = [response[0].lat, response[0].lon];
|
|
|
|
const coords: [string, string] = [response[0].lat, response[0].lon];
|
|
|
|
|
|
|
|
const user_id = localStorage.getItem('auth_token');
|
|
|
|
return this.http.post<any>(
|
|
|
|
return this.http.post<any>(
|
|
|
|
url,
|
|
|
|
url,
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -36,6 +37,7 @@ export class AddPinService {
|
|
|
|
description: pin.description,
|
|
|
|
description: pin.description,
|
|
|
|
location: coords,
|
|
|
|
location: coords,
|
|
|
|
files: pin.files,
|
|
|
|
files: pin.files,
|
|
|
|
|
|
|
|
user_id: user_id,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ headers }
|
|
|
|
{ headers }
|
|
|
|
);
|
|
|
|
);
|
|
|
|