Expose seeded Heimdall dashboard
Homelab Main / deploy (push) Successful in 1m28s Details

This commit is contained in:
juvdiaz 2026-06-02 22:02:01 -06:00
parent e16d99ffaf
commit 122407899d
1 changed files with 15 additions and 1 deletions

View File

@ -116,6 +116,17 @@ data:
def quote_identifier(name):
return '"' + name.replace('"', '""') + '"'
def ensure_public_dashboard(conn, user_id):
if not table_exists(conn, "users"):
return
user_columns = columns(conn, "users")
if "public_front" not in user_columns:
return
conn.execute(
'update "users" set "public_front" = 1 where "id" = ?',
(user_id,),
)
def wait_for_items_table(db_path):
while True:
try:
@ -129,8 +140,11 @@ data:
def upsert_links(conn, links):
item_columns = columns(conn, "items")
seed_user_id = 1
now = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S")
ensure_public_dashboard(conn, seed_user_id)
for order, link in enumerate(links):
existing = conn.execute(
'select "id" from "items" where "title" = ?',
@ -144,7 +158,7 @@ data:
"pinned": 1,
"order": order,
"type": 0,
"user_id": 1,
"user_id": seed_user_id,
"class": link.get("class"),
"appid": None,
"appdescription": link.get("description"),