Skip to content

Commit

Permalink
Merge 7d340cd into b1086d1
Browse files Browse the repository at this point in the history
  • Loading branch information
meelrossi committed Mar 13, 2023
2 parents b1086d1 + 7d340cd commit e30707d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Collection/Collection.router.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ import {
CollectionAttributes,
ThirdPartyCollectionAttributes,
FullCollection,
CollectionSort
CollectionSort,
CollectionTypeFilter
} from './Collection.types'

const server = supertest(app.getApp())
Expand Down Expand Up @@ -2656,6 +2657,7 @@ describe('Collection router', () => {
status: undefined,
limit,
offset: page - 1, // it's the offset,
type: CollectionTypeFilter.STANDARD,
thirdPartyIds: [],
remoteIds: [],
itemTags: undefined,
Expand Down Expand Up @@ -2716,6 +2718,7 @@ describe('Collection router', () => {
limit,
thirdPartyIds: [],
remoteIds: [],
type: CollectionTypeFilter.STANDARD,
itemTags: [itemTag.toLowerCase()],
})
})
Expand Down Expand Up @@ -2776,6 +2779,7 @@ describe('Collection router', () => {
limit,
thirdPartyIds: [],
remoteIds: [],
type: CollectionTypeFilter.STANDARD,
itemTags: [itemTag.toLowerCase(), itemTag2.toLowerCase()],
})
})
Expand Down
1 change: 1 addition & 0 deletions src/Collection/Collection.router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ export class CollectionRouter extends Router {
isPublished: is_published ? is_published === 'true' : undefined,
offset: page && limit ? getOffset(page, limit) : undefined,
limit,
type: CollectionTypeFilter.STANDARD,
remoteIds: status
? remoteCollections.map((c) => c.id)
: // if the status is not passed, we still want to prioritize the not approved. It won't filter by them, it'll just use them for the sort.
Expand Down

0 comments on commit e30707d

Please sign in to comment.