Add content-type header to PUT request, now required in Kratos 0.10.1

This commit is contained in:
Jason Ertel
2022-07-11 13:43:41 -04:00
parent 4f8bb6049b
commit 077053afbd

View File

@@ -437,7 +437,7 @@ function updateStatus() {
state="inactive"
fi
body="{ \"schema_id\": \"$schemaId\", \"state\": \"$state\", \"traits\": $traitBlock }"
response=$(curl -fSsL -XPUT "${kratosUrl}/identities/$identityId" -d "$body")
response=$(curl -fSsL -XPUT -H "Content-Type: application/json" "${kratosUrl}/identities/$identityId" -d "$body")
[[ $? != 0 ]] && fail "Unable to update user"
}