diff --git a/ufw b/ufw index 0b2cc90..ad5723d 100755 --- a/ufw +++ b/ufw @@ -184,13 +184,12 @@ upload() { get_shortlink() { declare url=$1 api_response api_status api_status_message - api_response=$( curl -sL "$cfg_service_url/$cfg_api_path/url?a=add&url=${url}&format=json&secret=$secret" ) - + api_response=$( curl -sL "$cfg_service_url/shrink.json?url=${url}&secret=$secret" ) get_api_status <<< "$api_response" if (( api_status == 200 )); then read -r short_url real_url < <( - jshon -e data -e URL -e shorturl -u <<< "$api_response" + jshon -e data -e short_url -u <<< "$api_response" ) printf '%s\n' "$short_url"