Skip to content

Commit

Permalink
Fix location qualification api use (#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaked-hayek committed Jan 9, 2024
1 parent a8b248a commit 84594b6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/services/news.data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ export function updateNews(newsId: number, newLocationQualification: any,
data.push(`newsflash_location_qualification=${newLocationQualification}`)
if (gpsLocation) {
data.push(`road_segment_name=${gpsLocation.road_segment_name}`)
// data.push(`road1=${gpsLocation.road1}`) TODO: uncomment when option added
data.push(`road1=${gpsLocation.road1}`)
} else if (streetLocation) {
data.push(`yishuv_name=${streetLocation.street}`)
data.push(`street1_hebrew=${streetLocation.city}`)
data.push(`yishuv_name=${streetLocation.city.yishuv_name}`)
data.push(`street1_hebrew=${streetLocation.street.street_hebrew}`)
}
const url = `${NEWS_FLASH_API}?${newsId}`;
const url = `${NEWS_FLASH_API}/${newsId}?${data.join('&')}`;
axios
.put(url)
.patch(url)
.then((res) => res.data)
.catch(onErrorFetchNewsFlash)
}

0 comments on commit 84594b6

Please sign in to comment.