fix: return search results if only tags
This commit is contained in:
parent
2b4173d759
commit
813d67a374
@ -66,6 +66,9 @@ export async function searchResource(
|
|||||||
for (const tag of tags) {
|
for (const tag of tags) {
|
||||||
q = q.replaceAll(`#${tag}`, "");
|
q = q.replaceAll(`#${tag}`, "");
|
||||||
}
|
}
|
||||||
|
if (!q.trim().length) {
|
||||||
|
q = "*";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return await typesenseClient.collections("resources")
|
return await typesenseClient.collections("resources")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user