diff --git a/contrib/bulk_create.py b/contrib/bulk_create.py index 8ed6aed..3d7fbf5 100755 --- a/contrib/bulk_create.py +++ b/contrib/bulk_create.py @@ -4,7 +4,7 @@ import sys import requests -BASE = "https://in.ccc.ac/api" +BASE = "https://in.ccc.ac" COUNT = 0 START_ID = 1 @@ -12,7 +12,7 @@ START_ID = 1 session = requests.Session() # session.auth = (":)", ":)") -res = session.get(f"{BASE}/items") +res = session.get(f"{BASE}/api/items") res.raise_for_status() ids = res.json().keys() kiste_ids = {int(i.lstrip("K")) for i in ids if i.startswith("K") and i != "K"} @@ -42,6 +42,6 @@ for i in new_ids: "note": "Bitte Name, Ort, Inhalt eintragen", "hidden": False, } - res = session.put(f"{BASE}/items/{j['id']}", json=j) + res = session.put(f"{BASE}/api/items/{j['id']}", json=j) res.raise_for_status() - print(f"{j['id']},https://in.ccc.ac/form.html?id={j['id']}") + print(f"{j['id']},{BASE}/form.html?id={j['id']}")