empty urls

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2026-11-28 01:03:39 +00:00
parent 6fdee2ab73
commit bf829cd1f7
+6 -1
View File
@@ -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
;;