mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix tests
This commit is contained in:
parent
835b61064f
commit
3e91f3836b
1 changed files with 6 additions and 3 deletions
|
|
@ -65,7 +65,9 @@ export class ReadwiseIntegration extends IntegrationService {
|
|||
let result = true
|
||||
|
||||
const highlights = await Promise.all(
|
||||
items.map((item) => this.libraryItemToReadwiseHighlight(item))
|
||||
items.map((item) =>
|
||||
this.libraryItemToReadwiseHighlight(item, integration.user.id)
|
||||
)
|
||||
)
|
||||
// If there are no highlights, we will skip the sync
|
||||
if (highlights.length > 0) {
|
||||
|
|
@ -87,11 +89,12 @@ export class ReadwiseIntegration extends IntegrationService {
|
|||
}
|
||||
|
||||
libraryItemToReadwiseHighlight = async (
|
||||
item: LibraryItem
|
||||
item: LibraryItem,
|
||||
userId: string
|
||||
): Promise<ReadwiseHighlight[]> => {
|
||||
let highlights = item.highlights
|
||||
if (!highlights) {
|
||||
highlights = await findHighlightsByLibraryItemId(item.id, item.user.id)
|
||||
highlights = await findHighlightsByLibraryItemId(item.id, userId)
|
||||
}
|
||||
|
||||
const category = item.siteName === 'Twitter' ? 'tweets' : 'articles'
|
||||
|
|
|
|||
Loading…
Reference in a new issue