From 13b43b2c6a6297a87afc9ca38c07658d95a61bb1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 30 Dec 2023 21:00:26 +0100 Subject: [PATCH] refactor: return set configuration value in setConfigurationKeyValue() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ConfigurationKeyUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 = ( -- 2.34.1