mikmc commited on
Commit
9842e64
·
verified ·
1 Parent(s): 288197c

Update handlers/search-catalog.js

Browse files
Files changed (1) hide show
  1. handlers/search-catalog.js +6 -3
handlers/search-catalog.js CHANGED
@@ -6,12 +6,15 @@ module.exports = (dependencies) => {
6
  // Validate the content type
7
  validateContentType(args)
8
 
9
- // Perform the search using searchCatalog
10
- const items = await searchCatalog({
11
  search: args.extra.search,
12
  genre: args.extra.genre,
13
  skip: args.extra.skip,
14
- })
 
 
 
15
 
16
  // Return the catalog in the required format
17
  return {
 
6
  // Validate the content type
7
  validateContentType(args)
8
 
9
+ // Adjust search query parameters and ensure we don't pass an invalid 'license'
10
+ const searchParams = {
11
  search: args.extra.search,
12
  genre: args.extra.genre,
13
  skip: args.extra.skip,
14
+ }
15
+
16
+ // Perform the search using searchCatalog
17
+ const items = await searchCatalog(searchParams)
18
 
19
  // Return the catalog in the required format
20
  return {