Fix user delete flow

This commit is contained in:
Urtzi Alfaro
2025-08-02 17:38:55 +02:00
parent 3681429e11
commit fa9915f63d
2 changed files with 20 additions and 3 deletions

View File

@@ -463,7 +463,15 @@ echo "Registration Response:"
echo "$REGISTER_RESPONSE" | python3 -m json.tool 2>/dev/null || echo "$REGISTER_RESPONSE"
if check_response "$REGISTER_RESPONSE" "User Registration"; then
USER_ID=$(extract_json_field "$REGISTER_RESPONSE" "id")
USER_ID=$(echo "$REGISTER_RESPONSE" | python3 -c "
import json, sys
try:
data = json.load(sys.stdin)
user = data.get('user', {})
print(user.get('id', ''))
except:
print('')
")
if [ -n "$USER_ID" ]; then
log_success "User ID extracted: $USER_ID"
fi
@@ -471,7 +479,6 @@ else
echo "Full response: $REGISTER_RESPONSE"
exit 1
fi
echo ""
# =================================================================