mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
max rss feed defaults to 256
This commit is contained in:
parent
b135dfbc46
commit
36896a8770
2 changed files with 6 additions and 4 deletions
|
|
@ -223,7 +223,7 @@ export const subscribeResolver = authorized<
|
|||
}
|
||||
|
||||
// create new rss subscription
|
||||
const MAX_RSS_SUBSCRIPTIONS = 150
|
||||
const MAX_RSS_SUBSCRIPTIONS = env.subscription.feed.max
|
||||
// validate rss feed
|
||||
const feed = await parseFeed(input.url)
|
||||
if (!feed) {
|
||||
|
|
@ -232,7 +232,7 @@ export const subscribeResolver = authorized<
|
|||
}
|
||||
}
|
||||
|
||||
// limit number of rss subscriptions to 150
|
||||
// limit number of rss subscriptions to max
|
||||
const results = (await getRepository(Subscription).query(
|
||||
`insert into omnivore.subscriptions (name, url, description, type, user_id, icon, auto_add_to_library, is_private)
|
||||
select $1, $2, $3, $4, $5, $6, $7, $8 from omnivore.subscriptions
|
||||
|
|
@ -263,7 +263,7 @@ export const subscribeResolver = authorized<
|
|||
// create a cloud task to fetch rss feed item for the new subscription
|
||||
await enqueueRssFeedFetch({
|
||||
userIds: [uid],
|
||||
url: input.url,
|
||||
url: feed.url,
|
||||
subscriptionIds: [newSubscription.id],
|
||||
scheduledDates: [new Date()], // fetch immediately
|
||||
fetchedDates: [null],
|
||||
|
|
|
|||
|
|
@ -311,7 +311,9 @@ export function getEnv(): BackendEnv {
|
|||
|
||||
const subscription = {
|
||||
feed: {
|
||||
max: parseInt(parse('SUBSCRIPTION_FEED_MAX'), 10),
|
||||
max: parse('SUBSCRIPTION_FEED_MAX')
|
||||
? parseInt(parse('SUBSCRIPTION_FEED_MAX'), 10)
|
||||
: 256, // default to 256
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue