From 84594b64678d98a7ebca1b1b8829b986c3870701 Mon Sep 17 00:00:00 2001 From: Shaked Hayek Date: Tue, 9 Jan 2024 13:58:18 +0200 Subject: [PATCH] Fix location qualification api use (#1022) --- src/services/news.data.service.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/services/news.data.service.ts b/src/services/news.data.service.ts index 12613a93..4a985e28 100644 --- a/src/services/news.data.service.ts +++ b/src/services/news.data.service.ts @@ -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) }