mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-06 07:49:17 +00:00
Update build.func
This commit is contained in:
parent
3677d116fb
commit
deaf6918e9
@ -837,11 +837,11 @@ post_to_api() {
|
||||
EOF
|
||||
)
|
||||
|
||||
RESPONSE=$(curl -s -o response.txt -w "%{http_code}" -X POST "$API_URL" \
|
||||
RESPONSE=$(curl -s -o response.txt -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$JSON_PAYLOAD")
|
||||
|
||||
if [ ! "$RESPONSE" -eq 201 ]; then
|
||||
|
||||
if [ "$RESPONSE" -ne 201 ] && [ "$RESPONSE" -ne 302 ]; then
|
||||
msg_error "API request failed with HTTP code $RESPONSE"
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user