From d7a81483cfd772bf1ba7b9213b94e94bc271ae2f Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Tue, 6 Feb 2024 17:02:00 +0800 Subject: [PATCH] resolve conflicts --- packages/api/src/resolvers/article/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/api/src/resolvers/article/index.ts b/packages/api/src/resolvers/article/index.ts index e3eb2a0c7..34c7abdd6 100644 --- a/packages/api/src/resolvers/article/index.ts +++ b/packages/api/src/resolvers/article/index.ts @@ -595,7 +595,14 @@ export const saveArticleReadingProgressResolver = authorized< // We don't need to update the values of reading progress here // because the function resolver will handle that for us when // it resolves the properties of the Article object - let updatedItem = await findLibraryItemById(id, uid) + let updatedItem = await authTrx((tx) => + tx.getRepository(LibraryItem).findOne({ + where: { + id, + }, + relations: ['user'], + }) + ) if (!updatedItem) { return { errorCodes: [SaveArticleReadingProgressErrorCode.Unauthorized],