Refactor import paths and enhance logging in various modules; add user table creation in start.py

This commit is contained in:
Mabe
2026-09-19 13:13:03 -07:00
parent 83c288d490
commit f5919b2845
7 changed files with 83 additions and 5 deletions
+8 -1
View File
@@ -2,7 +2,7 @@ from dotenv import load_dotenv
import db
import os
import logging
import api_security as auth
import auth.api_security as auth
#Logging
@@ -44,8 +44,15 @@ def new_table(name):
db.connection.commit()
logging.info("Table 'luggage' created")
if name == "user":
executed = "CREATE TABLE user (username VARCHAR(50) PRIMARY KEY, password VARCHAR(255))"
cursor.execute(executed)
db.connection.commit()
logging.info("Table 'user' created")
new_table("tokens")
new_table("luggage")
new_table("user")
print(auth.admin_token())