fix: remove quotes that break the first function.

This commit is contained in:
2025-07-18 03:13:19 -07:00
parent 743d4745d7
commit 00b78330d7

4
mc
View File

@@ -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