feat(lib-telemetry): improve code readability

This commit is contained in:
purple 2023-11-20 23:49:24 +01:00 committed by GitHub
parent b48b083a64
commit 040c0465dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}