replace fetch_content with fetch_content_type as a enum: ALWAYS, NEVER, WHEN_EMPTY

This commit is contained in:
Hongbo Wu
2024-02-23 14:19:22 +08:00
parent 08e4bed146
commit f4b6e470f2
12 changed files with 152 additions and 56 deletions

View File

@ -9,6 +9,7 @@ import { DeepPartial } from 'typeorm'
import { v4 as uuid } from 'uuid'
import { ImportItemState } from '../entity/integration'
import { Recommendation } from '../entity/recommendation'
import { FetchContentType } from '../entity/subscription'
import { env } from '../env'
import {
ArticleSavingRequestStatus,
@ -625,7 +626,7 @@ export interface RssSubscriptionGroup {
mostRecentItemDates: (Date | null)[]
scheduledDates: Date[]
checksums: (string | null)[]
fetchContents: boolean[]
fetchContentTypes: FetchContentType[]
folders: string[]
}
@ -648,7 +649,7 @@ export const enqueueRssFeedFetch = async (
timestamp.getTime()
), // unix timestamp in milliseconds
userIds: subscriptionGroup.userIds,
fetchContents: subscriptionGroup.fetchContents,
fetchContentTypes: subscriptionGroup.fetchContentTypes,
folders: subscriptionGroup.folders,
}