fix tests
This commit is contained in:
@ -2702,7 +2702,7 @@ export enum SubscribeErrorCode {
|
||||
}
|
||||
|
||||
export type SubscribeInput = {
|
||||
isFetchingContent?: InputMaybe<Scalars['Boolean']>;
|
||||
autoAddToLibrary?: InputMaybe<Scalars['Boolean']>;
|
||||
isPublic?: InputMaybe<Scalars['Boolean']>;
|
||||
subscriptionType?: InputMaybe<SubscriptionType>;
|
||||
url: Scalars['String'];
|
||||
@ -3062,9 +3062,9 @@ export enum UpdateSubscriptionErrorCode {
|
||||
}
|
||||
|
||||
export type UpdateSubscriptionInput = {
|
||||
autoAddToLibrary?: InputMaybe<Scalars['Boolean']>;
|
||||
description?: InputMaybe<Scalars['String']>;
|
||||
id: Scalars['ID'];
|
||||
isFetchingContent?: InputMaybe<Scalars['Boolean']>;
|
||||
isPublic?: InputMaybe<Scalars['Boolean']>;
|
||||
lastFetchedAt?: InputMaybe<Scalars['Date']>;
|
||||
lastFetchedChecksum?: InputMaybe<Scalars['String']>;
|
||||
|
||||
@ -2129,7 +2129,7 @@ enum SubscribeErrorCode {
|
||||
}
|
||||
|
||||
input SubscribeInput {
|
||||
isFetchingContent: Boolean
|
||||
autoAddToLibrary: Boolean
|
||||
isPublic: Boolean
|
||||
subscriptionType: SubscriptionType
|
||||
url: String!
|
||||
@ -2460,9 +2460,9 @@ enum UpdateSubscriptionErrorCode {
|
||||
}
|
||||
|
||||
input UpdateSubscriptionInput {
|
||||
autoAddToLibrary: Boolean
|
||||
description: String
|
||||
id: ID!
|
||||
isFetchingContent: Boolean
|
||||
isPublic: Boolean
|
||||
lastFetchedAt: Date
|
||||
lastFetchedChecksum: String
|
||||
|
||||
@ -228,7 +228,7 @@ export const subscribeResolver = authorized<
|
||||
|
||||
// limit number of rss subscriptions to 150
|
||||
const results = (await getRepository(Subscription).query(
|
||||
`insert into omnivore.subscriptions (name, url, description, type, user_id, icon, is_fetching_content)
|
||||
`insert into omnivore.subscriptions (name, url, description, type, user_id, icon, auto_add_to_library)
|
||||
select $1, $2, $3, $4, $5, $6, $7 from omnivore.subscriptions
|
||||
where user_id = $5 and type = 'RSS' and status = 'ACTIVE'
|
||||
having count(*) < $8
|
||||
@ -240,7 +240,7 @@ export const subscribeResolver = authorized<
|
||||
SubscriptionType.Rss,
|
||||
uid,
|
||||
feed.image?.url || null,
|
||||
!!input.isFetchingContent,
|
||||
!!input.autoAddToLibrary,
|
||||
MAX_RSS_SUBSCRIPTIONS,
|
||||
]
|
||||
)) as Subscription[]
|
||||
@ -315,6 +315,7 @@ export const updateSubscriptionResolver = authorized<
|
||||
scheduledAt: input.scheduledAt
|
||||
? new Date(input.scheduledAt)
|
||||
: undefined,
|
||||
autoAddToLibrary: input.autoAddToLibrary || undefined,
|
||||
})
|
||||
|
||||
return repo.findOneByOrFail({
|
||||
|
||||
@ -2555,7 +2555,7 @@ const schema = gql`
|
||||
url: String!
|
||||
subscriptionType: SubscriptionType
|
||||
isPublic: Boolean
|
||||
isFetchingContent: Boolean
|
||||
autoAddToLibrary: Boolean
|
||||
}
|
||||
|
||||
input UpdateSubscriptionInput {
|
||||
@ -2567,7 +2567,7 @@ const schema = gql`
|
||||
status: SubscriptionStatus
|
||||
scheduledAt: Date
|
||||
isPublic: Boolean
|
||||
isFetchingContent: Boolean
|
||||
autoAddToLibrary: Boolean
|
||||
}
|
||||
|
||||
union UpdateSubscriptionResult =
|
||||
|
||||
@ -108,10 +108,10 @@ const buildWhereClause = (
|
||||
if (args.inFilter !== InFilter.ALL) {
|
||||
if (args.inFilter === InFilter.FOLLOWING) {
|
||||
queryBuilder
|
||||
.andWhere('library_item.shared_by IS NOT NULL')
|
||||
.andWhere('library_item.added_to_following_at IS NOT NULL')
|
||||
.andWhere('library_item.hidden_at IS NULL')
|
||||
} else {
|
||||
queryBuilder.andWhere('library_item.is_in_library = true')
|
||||
queryBuilder.andWhere('library_item.added_to_library_at IS NOT NULL')
|
||||
|
||||
switch (args.inFilter) {
|
||||
case InFilter.INBOX:
|
||||
|
||||
Reference in New Issue
Block a user