WIP: API usage as main

This commit is contained in:
2023-02-15 14:06:06 +01:00
parent 6eaa6019a3
commit 5b1afe2c9e
12 changed files with 211 additions and 110 deletions

View File

@@ -27,10 +27,11 @@ db = db_client.get_database(name=db_config["name"])
collections = db.list_collection_names()
for collection in ["sent", "banned", "submitted"]:
for collection in ["sent", "users", "banned", "submitted"]:
if not collection in collections:
db.create_collection(collection)
col_sent = db.get_collection("sent")
col_users = db.get_collection("users")
col_banned = db.get_collection("banned")
col_submitted = db.get_collection("submitted")