[30388f42] Infrastructure Hardening: Repaired CE/Connector DB schema, fixed frontend styling build, implemented robust echo shield in worker v2.1.1, and integrated Lead Engine into gateway.
This commit is contained in:
44
connector-superoffice/tools/so_surgical_update_v2.py
Normal file
44
connector-superoffice/tools/so_surgical_update_v2.py
Normal file
@@ -0,0 +1,44 @@
|
||||
import os
|
||||
import json
|
||||
import sys
|
||||
import requests
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Path gymnastics
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "connector-superoffice"))
|
||||
|
||||
from superoffice_client import SuperOfficeClient
|
||||
|
||||
# Load ENV
|
||||
load_dotenv(dotenv_path="/home/node/clawd/.env", override=True)
|
||||
|
||||
def surgical_update_v2(contact_id):
|
||||
client = SuperOfficeClient()
|
||||
print(f"--- Surgical Update V2: Contact {contact_id} ---")
|
||||
|
||||
# We now use the proper 'Urls' list format
|
||||
payload = {
|
||||
"contactId": int(contact_id),
|
||||
"Department": "Final Round-Trip 13:20",
|
||||
"Urls": [
|
||||
{
|
||||
"Value": "http://robo-planet.de",
|
||||
"Description": "Website"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
url = f"{client.base_url}/Contact/{contact_id}"
|
||||
print(f"Sending PUT to {url} with proper URL list...")
|
||||
|
||||
resp = requests.put(url, headers=client.headers, json=payload)
|
||||
|
||||
print(f"Status Code: {resp.status_code}")
|
||||
if resp.status_code == 200:
|
||||
print("✅ SUCCESS! Website should be visible now.")
|
||||
else:
|
||||
print(f"❌ Error: {resp.text}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
surgical_update_v2(2)
|
||||
Reference in New Issue
Block a user