diff --git a/shitty_api.sh b/shitty_api.sh index f5abc7e..f722312 100755 --- a/shitty_api.sh +++ b/shitty_api.sh @@ -42,7 +42,7 @@ post(){ curl -s "$baseurl$1" --json "$(echo ${*:2} | jq .+{\"auth\":\"$TOKE\"})" put(){ curl -sX PUT "$baseurl$1" --json "$(echo ${*:2} | jq .+{\"auth\":\"$TOKE\"})"; } #Utils -getbody(){ a=$(cat); b=${a//\"/\\\"}; while read n; do c="$c\n$n"; done <<< "$b"; body="${c:2}"; } +getbody(){ a=$(cat); while read n; do b="$b\n$n"; done <<< "$a"; c=${b//\"/\\\"}; body="${c:2}"; } actions="notifs notifs2 comments freepost shitpost follow unfollow home deref whoami login" #Endpoints.