mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-05 11:18:36 +02:00
fix sqlite and show user account
This commit is contained in:
@@ -117,6 +117,7 @@ def check_settings(app: FastAPI):
|
||||
while True:
|
||||
admin_set = await get_admin_settings()
|
||||
if admin_set :
|
||||
print(f"Access admin user account at: http://{lnbits.settings.HOST}:{lnbits.settings.PORT}/wallet?usr={admin_set.user}")
|
||||
break
|
||||
print("ERROR:", admin_set)
|
||||
await asyncio.sleep(5)
|
||||
|
@@ -69,7 +69,7 @@ async def get_admin_settings():
|
||||
exists = await conn.fetchone(
|
||||
"SELECT * FROM information_schema.tables WHERE table_name = 'admin'"
|
||||
)
|
||||
print("EXISTS", exists)
|
||||
|
||||
if not exists:
|
||||
return False
|
||||
|
||||
|
@@ -15,6 +15,7 @@ async def get_admin_user():
|
||||
user = account.id
|
||||
assert user, "Newly created user couldn't be retrieved"
|
||||
print(f"Your newly created account/user id is: {user}. This will be the Super Admin user.")
|
||||
conf.admin_users.insert(0, user)
|
||||
return user
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user