Merge pull request #2567 from omnivore-app/feature/increase-rss-limit

increase the max number of rss subscriptions to 50
This commit is contained in:
Jackson Harper 2023-08-01 20:15:50 +08:00 committed by GitHub
commit 9059deaef9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -235,12 +235,12 @@ export const subscribeResolver = authorized<
// validate rss feed
const feed = await parser.parseURL(input.url)
// limit number of rss subscriptions to 20
// limit number of rss subscriptions to 50
const newSubscriptions = (await AppDataSource.query(
`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(*) < 20
having count(*) < 50
returning *;`,
[
feed.title,