Browse Source

shrink moved too

Signed-off-by: fbt <fbt@fleshless.org>
master
Jack L. Frost 2 years ago
parent
commit
466050972d
  1. 5
      ufw

5
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"

Loading…
Cancel
Save