From 6eb8837a44ce4595d99def99d39f80b813b9f660 Mon Sep 17 00:00:00 2001 From: shaked-hayek <85109951+shaked-hayek@users.noreply.github.com> Date: Wed, 10 Jan 2024 20:59:34 +0200 Subject: [PATCH] Fix location qualification api use (#1022) (#1023) --- 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) }