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
|
for command in "${!commands[@]}"; do
|
||||||
if [[ "$1" == "${command}" ]]; then
|
if [[ "$1" == "${command}" ]]; then
|
||||||
if [[ "$(second ${commands[$1]})" == "POST" ]]; 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 ""
|
echo ""
|
||||||
elif [[ "$(second ${commands[$1]})" == "FUNC" ]]; then
|
elif [[ "$(second ${commands[$1]})" == "FUNC" ]]; then
|
||||||
eval "$(first ${commands[$1]})"
|
eval "$(first ${commands[$1]})"
|
||||||
else
|
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 ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user