mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix tests for popular reads
This commit is contained in:
parent
50bfc1fa74
commit
01c74cb7c4
1 changed files with 2 additions and 4 deletions
|
|
@ -66,11 +66,10 @@ export const addPopularRead = async (
|
|||
return undefined
|
||||
}
|
||||
|
||||
const saveTime = new Date()
|
||||
const slug = generateSlug(pr.title)
|
||||
|
||||
const articleToSave: DeepPartial<LibraryItem> = {
|
||||
slug: slug,
|
||||
slug,
|
||||
readableContent: pr.content,
|
||||
originalContent: pr.originalHtml,
|
||||
description: pr.description,
|
||||
|
|
@ -81,9 +80,8 @@ export const addPopularRead = async (
|
|||
textContentHash: stringToHash(pr.content),
|
||||
thumbnail: pr.previewImage,
|
||||
publishedAt: pr.publishedAt,
|
||||
savedAt: saveTime,
|
||||
createdAt: saveTime,
|
||||
siteName: pr.siteName,
|
||||
user: { id: userId },
|
||||
}
|
||||
|
||||
const item = await createLibraryItem(articleToSave, userId)
|
||||
|
|
|
|||
Loading…
Reference in a new issue