Return deleted article in the updatesSince API response

This commit is contained in:
Hongbo Wu
2022-10-14 13:50:53 +08:00
parent 22a5850c1e
commit 496b28c9ee

View File

@ -993,18 +993,13 @@ export const updatesSinceResolver = authorized<
const edges = pages.map((p) => {
const updateReason = getUpdateReason(p, startDate)
return {
node:
updateReason === UpdateReason.Deleted
? null
: ({
...p,
image: p.image && createImageProxyUrl(p.image, 260, 260),
isArchived: !!p.archivedAt,
contentReader:
p.pageType === PageType.File
? ContentReader.Pdf
: ContentReader.Web,
} as SearchItem),
node: {
...p,
image: p.image && createImageProxyUrl(p.image, 260, 260),
isArchived: !!p.archivedAt,
contentReader:
p.pageType === PageType.File ? ContentReader.Pdf : ContentReader.Web,
} as SearchItem,
cursor: endCursor,
itemID: p.id,
updateReason,