fix: return search results if only tags

This commit is contained in:
max_richter 2023-08-12 19:20:53 +02:00
parent 2b4173d759
commit 813d67a374

View File

@ -66,6 +66,9 @@ export async function searchResource(
for (const tag of tags) {
q = q.replaceAll(`#${tag}`, "");
}
if (!q.trim().length) {
q = "*";
}
}
return await typesenseClient.collections("resources")