shrink moved too
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
99735444f3
commit
466050972d
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…
Reference in New Issue
Block a user