mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-29 05:31:15 +00:00
set up auth
This commit is contained in:
1 parent
b1de2c7321
commit
04957dd5a9
15 files changed
+350
-6
No files matched your search
@@ -4,6 +4,7 @@ Applies migrations.
|
||||
"""
|
||||
|
||||
from app.db.sqlite import create_connection, create_tables, queries
|
||||
from app.db.sqlite.auth import SQLiteAuthMethods as authdb
|
||||
from app.migrations import apply_migrations
|
||||
from app.settings import Db
|
||||
|
||||
@@ -29,5 +30,8 @@ def setup_sqlite():
|
||||
create_tables(user_db_conn, queries.CREATE_USERDATA_TABLES)
|
||||
create_tables(app_db_conn, queries.CREATE_MIGRATIONS_TABLE)
|
||||
|
||||
if not authdb.get_all_users():
|
||||
authdb.insert_default_user()
|
||||
|
||||
app_db_conn.close()
|
||||
user_db_conn.close()
|
||||
Reference in new issue
Block a user