From: Jérôme Benoit Date: Sat, 30 Dec 2023 20:00:26 +0000 (+0100) Subject: refactor: return set configuration value in setConfigurationKeyValue() X-Git-Tag: v1.2.31~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=13b43b2c6a6297a87afc9ca38c07658d95a61bb1;p=e-mobility-charging-stations-simulator.git refactor: return set configuration value in setConfigurationKeyValue() Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ConfigurationKeyUtils.ts b/src/charging-station/ConfigurationKeyUtils.ts index 72fb88d7..556cf54a 100644 --- a/src/charging-station/ConfigurationKeyUtils.ts +++ b/src/charging-station/ConfigurationKeyUtils.ts @@ -75,7 +75,7 @@ export const setConfigurationKeyValue = ( key: ConfigurationKeyType, value: string, caseInsensitive = false -): void => { +): ConfigurationKey | undefined => { const keyFound = getConfigurationKey(chargingStation, key, caseInsensitive) if (keyFound != null) { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion @@ -90,6 +90,7 @@ export const setConfigurationKeyValue = ( { key, value } ) } + return keyFound } export const deleteConfigurationKey = (