From 122407899d0bcb4a4909fcaa3e6df0e4782a3418 Mon Sep 17 00:00:00 2001 From: juvdiaz Date: Tue, 2 Jun 2026 22:02:01 -0600 Subject: [PATCH] Expose seeded Heimdall dashboard --- apps/heimdall/web-app.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/heimdall/web-app.yaml b/apps/heimdall/web-app.yaml index 6386403..f9d74bf 100644 --- a/apps/heimdall/web-app.yaml +++ b/apps/heimdall/web-app.yaml @@ -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"),