fix: handle missing widgetSecrets table and add default releases repo

- getConfiguredKinds now returns [] if table doesn't exist yet
- Add homarr-labs/homarr as default releases repository (v#.#.#)
This commit is contained in:
Thomas Camlong committed 2026-06-28 08:47:09 +02:00
1 parent a56bf0f32d
commit af35a50fa0
2 files changed
+19 -6

No files matched your search

@@ -83,10 +83,15 @@ export const widgetSecretsRouter = createTRPCRouter({
.query(async ({ ctx, input }) => {
await resolveItemWithBoardAccess(ctx, input.itemId);
const secrets = await ctx.db.query.widgetSecrets.findMany({
where: eq(widgetSecrets.itemId, input.itemId),
columns: { kind: true },
});
return secrets.map((s: { kind: string }) => s.kind);
try {
const secrets = await ctx.db.query.widgetSecrets.findMany({
where: eq(widgetSecrets.itemId, input.itemId),
columns: { kind: true },
});
return secrets.map((s: { kind: string }) => s.kind);
} catch {
// ponytail: table may not exist pre-migration, return empty
return [] as string[];
}
}),
});