mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #248 from omnivore-app/fix/elastic-reading-progress-nulls
Remove function handlers for reading progress
This commit is contained in:
commit
bef3dbd23a
1 changed files with 0 additions and 30 deletions
|
|
@ -386,36 +386,6 @@ export const functionResolvers = {
|
|||
? ContentReader.Pdf
|
||||
: ContentReader.Web
|
||||
},
|
||||
async readingProgressPercent(
|
||||
article: { id: string; readingProgressPercent?: number },
|
||||
_: unknown,
|
||||
ctx: WithDataSourcesContext & { claims: Claims }
|
||||
) {
|
||||
if ('readingProgressPercent' in article) {
|
||||
return article.readingProgressPercent
|
||||
}
|
||||
return (
|
||||
await getPageByParam({
|
||||
userId: ctx.claims.uid,
|
||||
_id: article.id,
|
||||
})
|
||||
)?.readingProgressPercent
|
||||
},
|
||||
async readingProgressAnchorIndex(
|
||||
article: { id: string; readingProgressAnchorIndex?: number },
|
||||
_: unknown,
|
||||
ctx: WithDataSourcesContext & { claims: Claims }
|
||||
) {
|
||||
if ('readingProgressAnchorIndex' in article) {
|
||||
return article.readingProgressAnchorIndex
|
||||
}
|
||||
return (
|
||||
await getPageByParam({
|
||||
userId: ctx.claims.uid,
|
||||
_id: article.id,
|
||||
})
|
||||
)?.readingProgressAnchorIndex
|
||||
},
|
||||
async highlights(
|
||||
article: { id: string; userId?: string },
|
||||
_: { input: ArticleHighlightsInput },
|
||||
|
|
|
|||
Loading…
Reference in a new issue