diff --git a/scripts/insert-nids.sh b/scripts/insert-nids.sh index 80e756a..6822661 100755 --- a/scripts/insert-nids.sh +++ b/scripts/insert-nids.sh @@ -13,9 +13,9 @@ 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 -R . | jq -s '{"values": .}') +PAYLOAD=$(tail +4 /tmp/rollback.csv | jq -R '[.]' | jq -s '{"values": .}') -curl -s -X POST \ +curl -v -s -X POST \ --header "Authorization: Bearer $ACCESS_TOKEN" \ --header "Content-Type: application/json" \ --data @<(echo "$PAYLOAD") \