revert :D and set value

This commit is contained in:
Max Peintner
2024-11-14 15:54:39 +01:00
parent b43db1ff2b
commit 414be0343c

View File

@@ -36,18 +36,12 @@ echo "Wrote environment file ${WRITE_ENVIRONMENT_FILE}"
cat ${WRITE_ENVIRONMENT_FILE} cat ${WRITE_ENVIRONMENT_FILE}
# waiting for default organization # waiting for default organization
until [ "$(echo "$DEFAULTORG_RESPONSE" | jq -r '.result | length')" -eq 1 ]; do until $(echo "$DEFAULTORG_RESPONSE" | jq -r '.result | length') == 1
do
DEFAULTORG_RESPONSE=$(curl -s --request POST \ DEFAULTORG_RESPONSE=$(curl -s --request POST \
--url "${ZITADEL_API_INTERNAL_URL}/v2/organizations/_search" \ --url "${ZITADEL_API_INTERNAL_URL}/v2/organizations/_search" \
--header "Authorization: Bearer ${PAT}" \ --header "Authorization: Bearer ${PAT}" \
--header "Host: ${ZITADEL_API_DOMAIN}" \ --header "Host: ${ZITADEL_API_DOMAIN}" \
-d '{"queries": [{"defaultQuery": {}}]}' ) -d '{"queries": [{"defaultQuery": {"value": true}}]}' )
if [ $? -ne 0 ]; then
echo "Error: Failed to fetch default organization response"
exit 1
fi
echo "Received default organization response: ${DEFAULTORG_RESPONSE}" echo "Received default organization response: ${DEFAULTORG_RESPONSE}"
sleep 5 done
done