musora-content-services 1.0.209 → 1.0.211

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.0.211](https://github.com/railroadmedia/musora-content-services/compare/v1.0.210...v1.0.211) (2024-12-03)
6
+
7
+ ### [1.0.210](https://github.com/railroadmedia/musora-content-services/compare/v1.0.209...v1.0.210) (2024-12-02)
8
+
5
9
  ### [1.0.209](https://github.com/railroadmedia/musora-content-services/compare/v1.0.208...v1.0.209) (2024-12-02)
6
10
 
7
11
  ### [1.0.208](https://github.com/railroadmedia/musora-content-services/compare/v1.0.207...v1.0.208) (2024-12-02)
package/README.md CHANGED
File without changes
File without changes
package/docs/index.html CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/jest.config.js CHANGED
File without changes
package/link_mcs.sh CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.0.209",
3
+ "version": "1.0.211",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
File without changes
package/src/index.d.ts CHANGED
File without changes
package/src/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -401,9 +401,11 @@ export async function fetchChallengeIndexMetadata(contentIds) {
401
401
  challengeIndexMetaDataPromise = getChallengeIndexMetadataPromise();
402
402
  }
403
403
  let results = await challengeIndexMetaDataPromise;
404
- results = results.filter(function(challenge){
405
- return contentIds.includes(challenge.content_id);
406
- });
404
+ if(Array.isArray(contentIds)){
405
+ results = results.filter(function(challenge){
406
+ return contentIds.includes(challenge.content_id);
407
+ });
408
+ }
407
409
  return results;
408
410
  }
409
411
 
@@ -514,7 +514,13 @@ export async function fetchAll(brand, type, {
514
514
  let bypassStatusAndPublishedValidation = (type == 'instructor' || groupBy == 'artist' || groupBy == 'genre' || groupBy == 'instructor');
515
515
 
516
516
  // Construct the type filter
517
- const typeFilter = type ? `&& _type == '${type}'` : "";
517
+ let typeFilter;
518
+
519
+ if( type === 'archives' ) {
520
+ typeFilter = `&& status == "archived"`
521
+ } else {
522
+ typeFilter = type ? `&& _type == '${type}'` : "";
523
+ }
518
524
 
519
525
  // Construct the search filter
520
526
  const searchFilter = searchTerm
@@ -597,7 +603,6 @@ export async function fetchAll(brand, type, {
597
603
  start: start,
598
604
  end: end,
599
605
  });
600
-
601
606
  return fetchSanity(query, true);
602
607
  }
603
608
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/test/log.js CHANGED
File without changes
File without changes
File without changes