⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.
TypeScript bookmarkbookmark-managercollaborationnextjsreact-nativeread-it-laterself-hostedtypescript
bug fix
Daniel818b04b7815e
diff --git a/components/FilterSearchDropdown.tsx b/components/FilterSearchDropdown.tsxindex e9fc001d..ab7313ed 100644--- a/components/FilterSearchDropdown.tsx+++ b/components/FilterSearchDropdown.tsx@@ -9,7 +9,6 @@ type Props = {name: boolean;url: boolean;description: boolean;- collection: boolean;tags: boolean;};};@@ -53,16 +52,6 @@ export default function FilterSearchDropdown({})}/>- <Checkbox- label="Collection"- state={searchFilter.collection}- onClick={() =>- setSearchFilter({- ...searchFilter,- collection: !searchFilter.collection,- })- }- /><Checkboxlabel="Tags"state={searchFilter.tags}diff --git a/lib/api/controllers/links/getLinks.ts b/lib/api/controllers/links/getLinks.tsindex 944f0405..127ccd19 100644--- a/lib/api/controllers/links/getLinks.ts+++ b/lib/api/controllers/links/getLinks.ts@@ -41,6 +41,21 @@ export default async function getLink(userId: number, body: string) {}: undefined,where: {+ collection: {+ id: query.collectionId ? query.collectionId : undefined, // If collectionId was defined, filter by collection+ OR: [+ {+ ownerId: userId,+ },+ {+ members: {+ some: {+ userId,+ },+ },+ },+ ],+ },[query.searchQuery ? "OR" : "AND"]: [{pinnedBy: query.pinnedOnly ? { some: { id: userId } } : undefined,@@ -72,32 +87,6 @@ export default async function getLink(userId: number, body: string) {mode: "insensitive",},},- {- collection: {- id: query.collectionId ? query.collectionId : undefined, // If collectionId was defined, filter by collection- name:- query.searchQuery && query.searchFilter?.collection- ? {- contains: query.searchQuery,- mode: "insensitive",- }- : undefined,- OR: query.searchQuery- ? undefined- : [- {- ownerId: userId,- },- {- members: {- some: {- userId,- },- },- },- ],- },- },{tags:query.searchQuery && !query.searchFilter?.tagsdiff --git a/types/global.ts b/types/global.tsindex ab96c7a6..a0c3f92b 100644--- a/types/global.ts+++ b/types/global.ts@@ -60,7 +60,6 @@ export type LinkSearchFilter = {name: boolean;url: boolean;description: boolean;- collection: boolean;tags: boolean;};