diff --git a/pleroma-cli.sh b/pleroma-cli.sh index 9114743..14d8b88 100755 --- a/pleroma-cli.sh +++ b/pleroma-cli.sh @@ -20,9 +20,12 @@ echo "Instance: $instance" if [ -n "$auth" ]; then default_curl_opt() { - curl -s --compressed -H "Authorization: Bearer $auth" $1 + curl -s --compressed -H "Authorization: Bearer $auth" "$@" + } + post_request() + { + curl -s --compressed -X POST -H "Authorization: Bearer $auth" "$@" } - alias post_request="curl -s --compressed -X POST -H \"Authorization: Bearer $auth\"" echo '+Authorized account+' else default_curl_opt() @@ -557,9 +560,12 @@ case $main_menu in if [ -n "$auth" ]; then default_curl_opt() { - curl -s --compressed -H "Authorization: Bearer $auth" $1 + curl -s --compressed -H "Authorization: Bearer $auth" "$@" + } + post_request() + { + curl -s --compressed -X POST -H "Authorization: Bearer $auth" "$@" } - alias post_request="curl -s --compressed -X POST -H \"Authorization: Bearer $auth\"" echo '+Authorized account+' else default_curl_opt()