use lower_case util function instead of raw bash command

pull/5110/head
zak905 2024-06-09 21:02:54 +02:00
parent 2797d2c535
commit cc9c85cc1a
No known key found for this signature in database
GPG Key ID: 718460806D947881
1 changed files with 2 additions and 2 deletions

View File

@ -95,10 +95,10 @@ _ionos_cloud_get_record() {
zone_id=$1
txtrecord=$2
# this is to transform the domain to lower case
fulldomain=$(printf "%s" "$3" | tr "[:upper:]" "[:lower:]")
fulldomain=$(printf "%s" "$3" | _lower_case
# this is to transform record name to lower case
# IONOS Cloud API transforms all record names to lower case
_record_name=$(printf "%s" "$fulldomain" | cut -d . -f 1 | tr "[:upper:]" "[:lower:]")
_record_name=$(printf "%s" "$fulldomain" | cut -d . -f 1 | _lower_case)
if _ionos_cloud_rest GET "$IONOS_CLOUD_ROUTE_ZONES/$zone_id/records"; then
_response="$(echo "$_response" | tr -d "\n")"