Compare commits

..

No commits in common. "master" and "1.21.1" have entirely different histories.

12
ufw
View File

@ -84,10 +84,7 @@ get_max_filesize() {
get_album_id() {
declare api_response api_status api_status_message
api_response=$( curl --get \
--data-urlencode "name=$1" \
--data-urlencode "secret=$secret" \
"$cfg_service_url/albumctl.json?m=new" )
api_response=$( curl -f "$cfg_service_url/albumctl.json?m=new&name=$1&secret=$secret" )
get_api_status <<< "$api_response"
@ -191,10 +188,7 @@ upload() {
get_shortlink() {
declare url=$1 api_response api_status api_status_message
api_response=$( curl --data-urlencode "url=$url" \
--data-urlencode "secret=$secret" \
"$cfg_service_url/shrink.json" )
api_response=$( curl "$cfg_service_url/shrink.json?url=${url}&secret=$secret" )
get_api_status <<< "$api_response"
if (( api_status == 200 )); then
@ -450,7 +444,7 @@ main() {
get_token || return $?
for t in "${args[@]}"; do
get_shortlink "$t"
get_shortlink "$1"
done
;;