sync update from LAN repo (source dhk-1 @ 3b1ec5b4)

This commit is contained in:
gozeros committed 2026-11-05 10:56:34 +08:00
1 parent da6521b6cb
commit 264e2200d6
995 files changed
+148105 -13399

No files matched your search

@@ -65,6 +65,22 @@ class LightAppRepository(LightAppStore):
result = await session.execute(stmt)
return [_to_dict(row) for row in result.scalars()]
async def list_sidebar_apps(self) -> list[dict[str, Any]]:
"""Avoid loading descriptions, icons, route JSON, tags, and audit data."""
stmt = (
select(
LightAppRow.app_id,
LightAppRow.name,
LightAppRow.mount_location,
LightAppRow.sort_order,
)
.where(LightAppRow.app_type == "iframe", LightAppRow.enabled.is_(True))
.order_by(LightAppRow.sort_order.asc(), LightAppRow.created_at.desc())
)
async with self._sf() as session:
result = await session.execute(stmt)
return [dict(row._mapping) for row in result]
async def get_app(self, app_id: str) -> dict[str, Any] | None:
async with self._sf() as session:
row = await session.get(LightAppRow, app_id)