'init'
This commit is contained in:
10
sc-lktx-backend/scripts/_check_depts.py
Normal file
10
sc-lktx-backend/scripts/_check_depts.py
Normal 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"]}')
|
||||
Reference in New Issue
Block a user