fix: remove quotes that break the first function.
This commit is contained in:
4
mc
4
mc
@@ -111,12 +111,12 @@ function main() {
|
||||
for command in "${!commands[@]}"; do
|
||||
if [[ "$1" == "${command}" ]]; then
|
||||
if [[ "$(second ${commands[$1]})" == "POST" ]]; then
|
||||
curl -sS "${headers[@]}" -X "$(second ${commands[$1]})" "${base_url}$(first "${commands[$1]}")" -d "$(printf "$(rest $(rest ${commands[$1]}))\n" "${args[@]}")"
|
||||
curl -sS "${headers[@]}" -X "$(second ${commands[$1]})" "${base_url}$(first ${commands[$1]})" -d "$(printf "$(rest $(rest ${commands[$1]}))\n" "${args[@]}")"
|
||||
echo ""
|
||||
elif [[ "$(second ${commands[$1]})" == "FUNC" ]]; then
|
||||
eval "$(first ${commands[$1]})"
|
||||
else
|
||||
curl -sS "${headers[@]}" -X "$(second ${commands[$1]})" "${base_url}$(first "${commands[$1]}")"
|
||||
curl -sS "${headers[@]}" -X "$(second ${commands[$1]})" "${base_url}$(first ${commands[$1]})"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user