From: Jérôme Benoit Date: Fri, 22 Mar 2024 17:52:54 +0000 (+0100) Subject: fix: ensure proper status in add charging stations op response X-Git-Tag: v1.3.1~14 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=43c49f23af9869b5a04da7c0e04b11b5243d9e34;p=e-mobility-charging-stations-simulator.git fix: ensure proper status in add charging stations op response Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ui-server/ui-services/AbstractUIService.ts b/src/charging-station/ui-server/ui-services/AbstractUIService.ts index 6ba08807..ffdc2565 100644 --- a/src/charging-station/ui-server/ui-services/AbstractUIService.ts +++ b/src/charging-station/ui-server/ui-services/AbstractUIService.ts @@ -301,7 +301,7 @@ export abstract class AbstractUIService { } } return { - status: failedStationInfos.length > 0 ? ResponseStatus.FAILURE : ResponseStatus.SUCCESS, + status: err != null ? ResponseStatus.FAILURE : ResponseStatus.SUCCESS, ...(succeededStationInfos.length > 0 && { hashIdsSucceeded: succeededStationInfos.map(stationInfo => stationInfo.hashId) }),