Poprawki w wyszikiwaniu kanałów i wyświetlaniu

This commit is contained in:
dm
2025-12-13 12:34:37 +01:00
parent 32d77ac5ad
commit 71d1b18314
6 changed files with 266 additions and 317 deletions

View File

@@ -14,7 +14,7 @@ export function GET({ url }) {
const q = (url.searchParams.get("q") || "").trim();
const limit = clamp(Number(url.searchParams.get("limit") || 50), 1, 200);
if (q.length < 2) {
if (q.length < 0) {
return new Response(JSON.stringify({ ok: true, data: [] }), {
status: 200,
headers: { "Content-Type": "application/json; charset=utf-8" },
@@ -27,9 +27,6 @@ export function GET({ url }) {
const db = getDb();
try {
// ✅ 1 rekord na kanał (grupujemy po name+logo_url)
// ✅ pakiety zbieramy do jednego pola packages_blob
// UWAGA: zakładam, że jambox_base_packages ma kolumnę "name"
const rows = db
.prepare(
`