mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-22 10:31:28 +00:00
Extented parametrs in function
This commit is contained in:
parent
da859e570e
commit
d0772a5003
|
@ -12,14 +12,14 @@ auth="$(jj -i .auth.json "$(echo $instance | sed 's/\./\\\./g')")"
|
||||||
if [ -n "$auth" ]; then
|
if [ -n "$auth" ]; then
|
||||||
default_curl_opt()
|
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)
|
listen_token=$(default_curl_opt "$instance_point/users/me" | jj tokens.listen)
|
||||||
echo '+Authorized account+'
|
echo '+Authorized account+'
|
||||||
else
|
else
|
||||||
default_curl_opt()
|
default_curl_opt()
|
||||||
{
|
{
|
||||||
curl -s --compressed $1
|
curl -s --compressed "$@"
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
funkwhale_api_check_api_limits()
|
funkwhale_api_check_api_limits()
|
||||||
|
@ -362,18 +362,18 @@ case "$choice" in
|
||||||
echo ''
|
echo ''
|
||||||
fi
|
fi
|
||||||
clear
|
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
|
if [ -n "$auth" ]; then
|
||||||
default_curl_opt()
|
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)
|
listen_token=$(default_curl_opt "$instance_point/users/me" | jj tokens.listen)
|
||||||
echo '+Authorized account+'
|
echo '+Authorized account+'
|
||||||
else
|
else
|
||||||
default_curl_opt()
|
default_curl_opt()
|
||||||
{
|
{
|
||||||
curl -s --compressed $1
|
curl -s --compressed "$@"
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
get_all_avalaible_count_tracks
|
get_all_avalaible_count_tracks
|
||||||
|
|
Loading…
Reference in a new issue