mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #2654 from omnivore-app/raise-rss-limit
raise rss limit to 150
This commit is contained in:
commit
d00eafd189
1 changed files with 3 additions and 1 deletions
|
|
@ -247,6 +247,7 @@ export const subscribeResolver = authorized<
|
|||
|
||||
// create new rss subscription
|
||||
if (input.url) {
|
||||
const MAX_RSS_SUBSCRIPTIONS = 150
|
||||
// validate rss feed
|
||||
const feed = await parser.parseURL(input.url)
|
||||
|
||||
|
|
@ -255,7 +256,7 @@ export const subscribeResolver = authorized<
|
|||
`insert into omnivore.subscriptions (name, url, description, type, user_id, icon)
|
||||
select $1, $2, $3, $4, $5, $6 from omnivore.subscriptions
|
||||
where user_id = $5 and type = 'RSS' and status = 'ACTIVE'
|
||||
having count(*) < 50
|
||||
having count(*) < $7
|
||||
returning *;`,
|
||||
[
|
||||
feed.title,
|
||||
|
|
@ -264,6 +265,7 @@ export const subscribeResolver = authorized<
|
|||
SubscriptionType.Rss,
|
||||
uid,
|
||||
feed.image?.url || null,
|
||||
MAX_RSS_SUBSCRIPTIONS,
|
||||
]
|
||||
)) as Subscription[]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue