diff --git a/scripts/insert-nids.sh b/scripts/insert-nids.sh index 8f63c3c..80e756a 100755 --- a/scripts/insert-nids.sh +++ b/scripts/insert-nids.sh @@ -13,7 +13,7 @@ fi # extract sheet ID from https://docs.google.com/spreadsheets/d/foo/edit?gid=0#gid=0 SHEET_ID=$(echo "$URL" | sed -n 's|.*/d/\(.*\)|\1|p') API_URL="https://sheets.googleapis.com/v4/spreadsheets/$SHEET_ID/values/Sheet1!D2:append" -PAYLOAD=$(tail +4 /tmp/rollback.csv | jq -nR '[inputs | {"values": [split("\n")]}]') +PAYLOAD=$(tail +4 /tmp/rollback.csv | jq -R . | jq -s '{"values": .}') curl -s -X POST \ --header "Authorization: Bearer $ACCESS_TOKEN" \