From 867903be008d4af22cd7299aaa4046f16c3ae5ae Mon Sep 17 00:00:00 2001 From: Zergling_man Date: Sun, 23 Oct 2022 23:54:49 +1100 Subject: [PATCH] Don't need to use \n anymore, newline actually turns into \n --- shitty_api.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shitty_api.sh b/shitty_api.sh index d0b065d..f7bdd17 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); body=${a//\"/\\\"}; } +getbody(){ a=$(cat); b=${a//\"/\\\"}; while read n; do c="$c\n$n"; done <<< "$b"; body="${c:2}"; } actions="notifs notifs2 comments freepost shitpost follow unfollow home deref whoami login" #Endpoints.