resolve conflicts

This commit is contained in:
Hongbo Wu 2024-02-06 17:02:00 +08:00
parent 1b60694579
commit d7a81483cf

View file

@ -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],