mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Add type filter
This commit is contained in:
parent
3565c7000e
commit
6c1484cd09
1 changed files with 11 additions and 11 deletions
|
|
@ -81,19 +81,19 @@ export const subscriptionsResolver = authorized<
|
|||
queryBuilder.andWhere({
|
||||
type,
|
||||
})
|
||||
} else {
|
||||
queryBuilder.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.where({
|
||||
type: SubscriptionType.Newsletter,
|
||||
status: SubscriptionStatus.Active,
|
||||
}).orWhere({
|
||||
type: SubscriptionType.Rss,
|
||||
})
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
queryBuilder.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.where({
|
||||
type: SubscriptionType.Newsletter,
|
||||
status: SubscriptionStatus.Active,
|
||||
}).orWhere({
|
||||
type: SubscriptionType.Rss,
|
||||
})
|
||||
})
|
||||
)
|
||||
|
||||
const subscriptions = await queryBuilder
|
||||
.orderBy('subscription.' + sortBy, sortOrder)
|
||||
.getMany()
|
||||
|
|
|
|||
Loading…
Reference in a new issue