Update readAt when saving reading progress

This commit is contained in:
Hongbo Wu 2022-06-04 22:11:44 +08:00
parent 577c6e84fb
commit b1d968ff23

View file

@ -49,9 +49,9 @@ import {
isParsingTimeout,
pageError,
stringToHash,
titleForFilePath,
userDataToUser,
validatedDate,
titleForFilePath,
} from '../../utils/helpers'
import {
ParsedContentPuppeteer,
@ -729,9 +729,10 @@ export const saveArticleReadingProgressResolver = authorized<
readingProgressAnchorIndex: shouldUpdate
? readingProgressAnchorIndex
: page.readingProgressAnchorIndex,
readAt: new Date(),
}
shouldUpdate && (await updatePage(id, updatedPart, { pubsub, uid }))
await updatePage(id, updatedPart, { pubsub, uid })
return {
updatedArticle: {