From 466050972d6c818e1c0f8e0cd8af03b2dfea1fee Mon Sep 17 00:00:00 2001 From: fbt Date: Sat, 23 Nov 2019 06:52:41 +0300 Subject: [PATCH] shrink moved too Signed-off-by: fbt --- ufw | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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"