musora-content-services 1.3.19 → 1.3.21

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.3.21](https://github.com/railroadmedia/musora-content-services/compare/v1.3.20...v1.3.21) (2025-03-21)
6
+
7
+ ### [1.3.20](https://github.com/railroadmedia/musora-content-services/compare/v1.3.19...v1.3.20) (2025-03-21)
8
+
5
9
  ### [1.3.19](https://github.com/railroadmedia/musora-content-services/compare/v1.3.18...v1.3.19) (2025-03-18)
6
10
 
7
11
  ### [1.3.18](https://github.com/railroadmedia/musora-content-services/compare/v1.3.17...v1.3.18) (2025-03-18)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.3.19",
3
+ "version": "1.3.21",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -492,8 +492,10 @@ export async function fetchChallengeUserActiveChallenges(brand = null) {
492
492
  * @returns {Promise<any|null>}
493
493
  */
494
494
  export async function fetchCarouselCardData(brand = null) {
495
- const brandParam = brand ? `?brand=${brand}` : ''
496
- let url = `/api/v2/content/carousel${brandParam}`
495
+ const urlParams = []
496
+ if (brand) urlParams.push(`brand=${brand}`)
497
+ if (globalConfig.sanityConfig.perspective === 'previewDrafts') urlParams.push(`sanityPreview`)
498
+ const url = `/api/v2/content/carousel${urlParams.length ? `?${urlParams.join('&')}` : ''}`
497
499
  return await fetchHandler(url, 'get')
498
500
  }
499
501
 
@@ -1198,7 +1200,6 @@ export async function setStudentViewForUser(userId, enable) {
1198
1200
  return await patchDataHandler(url, data)
1199
1201
  }
1200
1202
 
1201
-
1202
1203
  /**
1203
1204
  * Fetch the top comment for a given content
1204
1205
  *
@@ -1210,7 +1211,6 @@ export async function fetchTopComment(railcontentId) {
1210
1211
  return await fetchHandler(url)
1211
1212
  }
1212
1213
 
1213
-
1214
1214
  /**
1215
1215
  *
1216
1216
  * @param railcontentId