add jws token

This commit is contained in:
2025-09-17 13:10:04 +03:00
parent 6cf2101074
commit 7ce114c26c
4 changed files with 211 additions and 25 deletions

View File

@@ -7,8 +7,18 @@ class DBApplications:
default_path = os.getenv("DB_PATH", "instance/dev.db")
self.db_path = os.path.abspath(default_path)
os.makedirs(os.path.dirname(self.db_path), exist_ok=True)
self.drop_table()
self.create_table()
def drop_table(self):
with sqlite3.connect(self.db_path, check_same_thread=False) as conn:
cursor = conn.cursor()
cursor.execute("""
DROP TABLE applications;
""")
conn.commit()
def create_table(self):
with sqlite3.connect(self.db_path, check_same_thread=False) as conn:
cursor = conn.cursor()