From d0772a50030a94eb2b7eedd6db2ff6d93a976ece Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Thu, 14 Apr 2022 14:13:49 +0300 Subject: [PATCH] Extented parametrs in function --- funkwhale-cli.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/funkwhale-cli.sh b/funkwhale-cli.sh index 312399c..03d77ff 100755 --- a/funkwhale-cli.sh +++ b/funkwhale-cli.sh @@ -12,14 +12,14 @@ auth="$(jj -i .auth.json "$(echo $instance | sed 's/\./\\\./g')")" if [ -n "$auth" ]; then default_curl_opt() { - curl -s --compressed -H "Authorization: Bearer $auth" $1 + curl -s --compressed -H "Authorization: Bearer $auth" "$@" } listen_token=$(default_curl_opt "$instance_point/users/me" | jj tokens.listen) echo '+Authorized account+' else default_curl_opt() { - curl -s --compressed $1 + curl -s --compressed "$@" } fi funkwhale_api_check_api_limits() @@ -362,18 +362,18 @@ case "$choice" in echo '' fi clear - export auth="$(jj -i .auth.json "$(echo $instance | sed 's/\./\\\./g')")" + auth="$(jj -i .auth.json "$(echo $instance | sed 's/\./\\\./g')")" if [ -n "$auth" ]; then default_curl_opt() { - curl -s --compressed -H "Authorization: Bearer $auth" $1 + curl -s --compressed -H "Authorization: Bearer $auth" "$@" } listen_token=$(default_curl_opt "$instance_point/users/me" | jj tokens.listen) echo '+Authorized account+' else default_curl_opt() { - curl -s --compressed $1 + curl -s --compressed "$@" } fi get_all_avalaible_count_tracks