⚡️⚡️⚡️ 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
fix update collection bug
daniel31x13f7a53d53e262
diff --git a/lib/api/controllers/collections/collectionId/updateCollectionById.ts b/lib/api/controllers/collections/collectionId/updateCollectionById.tsindex e3006628..ca9b7895 100644--- a/lib/api/controllers/collections/collectionId/updateCollectionById.ts+++ b/lib/api/controllers/collections/collectionId/updateCollectionById.ts@@ -51,17 +51,18 @@ export default async function updateCollection(where: {id: collectionId,},-data: {name: data.name.trim(),description: data.description,color: data.color,isPublic: data.isPublic,- parent: {- connect: {- id: data.parentId || undefined,- },- },+ parent: data.parentId+ ? {+ connect: {+ id: data.parentId,+ },+ }+ : undefined,members: {create: data.members.map((e) => ({user: { connect: { id: e.user.id || e.userId } },