style: remove temporary probe and fix scripts from repository

This commit is contained in:
SmartUp Developer
2026-07-02 23:01:09 +08:00
parent fd2755d539
commit 445f33a6b0
-36
View File
@@ -1,36 +0,0 @@
import os
import sys
import json
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from app.database import SessionLocal
from app.models.website import Website
from app.routers.websites import _client
db = SessionLocal()
try:
website = db.query(Website).filter(Website.id == 2).first()
if not website:
print("Error: website wangwang888 (id=2) not found!")
sys.exit(1)
print(f"Loaded website: {website.name}, URL: {website.base_url}")
with _client(website) as c:
accounts = c.list_accounts()
acc = next((a for a in accounts if str(c.extract_id(a)) == "935"), None)
if not acc:
print("Error: Account 935 not found on remote site!")
sys.exit(1)
print(f"Found account 935: {acc.get('name')}, current platform: {acc.get('platform')}")
res = c.update_account("935", {"platform": "anthropic"})
print(f"Update response: {res}")
accounts_new = c.list_accounts()
acc_new = next((a for a in accounts_new if str(c.extract_id(a)) == "935"), None)
print(f"Verified account 935: {acc_new.get('name')}, new platform: {acc_new.get('platform')}")
finally:
db.close()