musora-content-services 1.0.210 → 1.0.212

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.
Files changed (36) hide show
  1. package/.github/workflows/node.js.yml +0 -0
  2. package/CHANGELOG.md +4 -0
  3. package/babel.config.js +0 -0
  4. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  5. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  6. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  7. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  8. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  9. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  10. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  11. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  12. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  13. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  14. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  15. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  16. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  17. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  18. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  19. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  20. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  22. package/docs/scripts/collapse.js +0 -0
  23. package/docs/scripts/commonNav.js +0 -0
  24. package/docs/scripts/linenumber.js +0 -0
  25. package/docs/scripts/nav.js +0 -0
  26. package/docs/scripts/polyfill.js +0 -0
  27. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
  28. package/docs/scripts/prettify/lang-css.js +0 -0
  29. package/docs/scripts/prettify/prettify.js +0 -0
  30. package/docs/scripts/search.js +0 -0
  31. package/docs/styles/jsdoc.css +0 -0
  32. package/docs/styles/prettify.css +0 -0
  33. package/jsdoc.json +0 -0
  34. package/link_mcs.sh +0 -0
  35. package/package.json +1 -1
  36. package/src/services/railcontent.js +12 -3
File without changes
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.212](https://github.com/railroadmedia/musora-content-services/compare/v1.0.211...v1.0.212) (2024-12-03)
6
+
7
+ ### [1.0.211](https://github.com/railroadmedia/musora-content-services/compare/v1.0.210...v1.0.211) (2024-12-03)
8
+
5
9
  ### [1.0.210](https://github.com/railroadmedia/musora-content-services/compare/v1.0.209...v1.0.210) (2024-12-02)
6
10
 
7
11
  ### [1.0.209](https://github.com/railroadmedia/musora-content-services/compare/v1.0.208...v1.0.209) (2024-12-02)
package/babel.config.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
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/jsdoc.json 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.210",
3
+ "version": "1.0.212",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -254,6 +254,7 @@ async function postDataHandler(url, data) {
254
254
  }
255
255
 
256
256
  export async function fetchHandler(url, method = "get", dataVersion = null, body = null) {
257
+ const params = new URLSearchParams(window.location.search);
257
258
  let headers = {
258
259
  'Content-Type': 'application/json',
259
260
  'X-CSRF-TOKEN': globalConfig.railcontentConfig.token,
@@ -261,6 +262,12 @@ export async function fetchHandler(url, method = "get", dataVersion = null, body
261
262
  if (globalConfig.railcontentConfig.authToken) {
262
263
  headers['Authorization'] = `Bearer ${globalConfig.railcontentConfig.authToken}`;
263
264
  }
265
+ if (params.get('testNow')) {
266
+ headers['testNow'] = params.get('testNow');
267
+ }
268
+ if (params.get('timezone')) {
269
+ headers['M-Client-Timezone'] = params.get('timezone');
270
+ }
264
271
  if (dataVersion) headers['Data-Version'] = dataVersion;
265
272
  const options = {
266
273
  method,
@@ -401,9 +408,11 @@ export async function fetchChallengeIndexMetadata(contentIds) {
401
408
  challengeIndexMetaDataPromise = getChallengeIndexMetadataPromise();
402
409
  }
403
410
  let results = await challengeIndexMetaDataPromise;
404
- results = results.filter(function(challenge){
405
- return contentIds.includes(challenge.content_id);
406
- });
411
+ if(Array.isArray(contentIds)){
412
+ results = results.filter(function(challenge){
413
+ return contentIds.includes(challenge.content_id);
414
+ });
415
+ }
407
416
  return results;
408
417
  }
409
418