From 040c0465dc0aee9de0a2c3dc3c1efb352c9a64a7 Mon Sep 17 00:00:00 2001 From: purple Date: Mon, 20 Nov 2023 23:49:24 +0100 Subject: [PATCH] feat(lib-telemetry): improve code readability --- blueprint/lib/telemetry.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/blueprint/lib/telemetry.sh b/blueprint/lib/telemetry.sh index 4b5bcaa..28863e9 100644 --- a/blueprint/lib/telemetry.sh +++ b/blueprint/lib/telemetry.sh @@ -4,8 +4,10 @@ # and may be intergrated directly into the core in the future. sendTelemetry() { - cd $BLUEPRINT__FOLDER; - key=$(cat .blueprint/extensions/blueprint/private/db/telemetry_id); - if [[ $key == "KEY_NOT_UPDATED" ]]; then exit 1;fi; - curl --location --silent "http://data.ptero.shop:3481/send/$key/$1" > /dev/null; + cd $BLUEPRINT__FOLDER + key=$(cat .blueprint/extensions/blueprint/private/db/telemetry_id) + if [[ $key == "KEY_NOT_UPDATED" ]]; then + exit 1 + fi + curl --location --silent "http://data.ptero.shop:3481/send/$key/$1" > /dev/null }