@@ -192,6 +192,11 @@ upload() {
|
||||
get_shortlink() {
|
||||
declare url=$1 api_response api_status api_status_message
|
||||
|
||||
[[ $url ]] || {
|
||||
err "URL is empty!"
|
||||
return 1
|
||||
}
|
||||
|
||||
api_response=$( curl --data-urlencode "url=$url" \
|
||||
--data-urlencode "secret=$secret" \
|
||||
"$cfg_service_url/shrink.json" )
|
||||
@@ -474,7 +479,7 @@ main() {
|
||||
get_token || return $?
|
||||
|
||||
for t in "${args[@]}"; do
|
||||
get_shortlink "$t"
|
||||
get_shortlink "$t" || return 1
|
||||
done
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user