search by text content functionality

This commit is contained in:
daniel31x13
2023-11-01 06:01:26 -04:00
parent b1c6a3faf1
commit b1b0d98eb2
9 changed files with 37 additions and 0 deletions
+9
View File
@@ -42,6 +42,15 @@ export default async function getLink(userId: number, query: LinkRequestQuery) {
});
}
if (query.searchByTextContent) {
searchConditions.push({
textContent: {
contains: query.searchQueryString,
mode: POSTGRES_IS_ENABLED ? "insensitive" : undefined,
},
});
}
if (query.searchByTags) {
searchConditions.push({
tags: {