From b03cfaee0f00fba0f3cb1fc066eb45c313af69c3 Mon Sep 17 00:00:00 2001 From: Wesley Finck Date: Thu, 15 Jan 2026 12:55:35 -0800 Subject: [PATCH] use user id to check if in lib --- .../application/use-cases/SearchLeafletDocsForUrlUseCase.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/search/application/use-cases/SearchLeafletDocsForUrlUseCase.ts b/src/modules/search/application/use-cases/SearchLeafletDocsForUrlUseCase.ts index 76e0cb8a..ab6ce346 100644 --- a/src/modules/search/application/use-cases/SearchLeafletDocsForUrlUseCase.ts +++ b/src/modules/search/application/use-cases/SearchLeafletDocsForUrlUseCase.ts @@ -15,7 +15,6 @@ import { export interface SearchLeafletDocsForUrlRequest extends SearchLeafletDocsForUrlParams { userDid?: string; // Optional - for authenticated features - callingUserId?: string; // Optional - to check if user has URLs in library } export type SearchLeafletDocsForUrlResult = Result< @@ -74,9 +73,9 @@ export class SearchLeafletDocsForUrlUseCase // Check if calling user has this URL in their library // Default to false if no calling user (unauthenticated request) - const urlInLibrary = request.callingUserId + const urlInLibrary = request.userDid ? librariesResult.items.some( - (library) => library.userId === request.callingUserId, + (library) => library.userId === request.userDid, ) : false; -- 2.51.2