This commit is contained in:
huangjin
2026-06-29 17:34:59 +08:00
commit fe3ad20fe2
271 changed files with 51767 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
import requests, os
token = os.environ.get("ADMIN_TOKEN", "")
if not token:
token = input("ADMIN_TOKEN: ").strip()
resp = requests.get("http://localhost:28175/v1/admin/departments-all",
headers={"Authorization": f"Bearer {token}"})
for d in resp.json().get("data", []):
print(f'{d["id"]:>3d} | {d["name"]}')