fix sqlite and show user account

This commit is contained in:
Tiago vasconcelos 2022-05-16 12:53:47 +01:00 committed by dni ⚡
parent 2f2d70f9a8
commit 08e54de99b
3 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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

View File

@ -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