musora-content-services 1.0.29 → 1.0.31

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.31](https://github.com/railroadmedia/musora-content-services/compare/v1.0.30...v1.0.31) (2024-08-14)
6
+
7
+ ### [1.0.30](https://github.com/railroadmedia/musora-content-services/compare/v1.0.29...v1.0.30) (2024-08-14)
8
+
5
9
  ### [1.0.29](https://github.com/railroadmedia/musora-content-services/compare/v1.0.28...v1.0.29) (2024-08-14)
6
10
 
7
11
  ### [1.0.28](https://github.com/railroadmedia/musora-content-services/compare/v1.0.27...v1.0.28) (2024-08-14)
@@ -111,7 +111,7 @@ module.exports = {
111
111
  <br class="clear">
112
112
 
113
113
  <footer>
114
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
114
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 17:42:41 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
115
115
  </footer>
116
116
 
117
117
  <script>prettyPrint();</script>
package/docs/index.html CHANGED
@@ -103,7 +103,7 @@ Run the following to execute the tests</p>
103
103
  <br class="clear">
104
104
 
105
105
  <footer>
106
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
106
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 17:42:41 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
107
107
  </footer>
108
108
 
109
109
  <script>prettyPrint();</script>
@@ -656,7 +656,7 @@ initializeService({
656
656
  <br class="clear">
657
657
 
658
658
  <footer>
659
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
659
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 17:42:41 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
660
660
  </footer>
661
661
 
662
662
  <script>prettyPrint();</script>
@@ -100,7 +100,7 @@
100
100
 
101
101
  <dt class="tag-source">Source:</dt>
102
102
  <dd class="tag-source"><ul class="dummy"><li>
103
- <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line51">line 51</a>
103
+ <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line57">line 57</a>
104
104
  </li></ul></dd>
105
105
 
106
106
 
@@ -526,7 +526,7 @@
526
526
 
527
527
  <dt class="tag-source">Source:</dt>
528
528
  <dd class="tag-source"><ul class="dummy"><li>
529
- <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line85">line 85</a>
529
+ <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line91">line 91</a>
530
530
  </li></ul></dd>
531
531
 
532
532
 
@@ -738,7 +738,7 @@
738
738
  <br class="clear">
739
739
 
740
740
  <footer>
741
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
741
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 17:42:41 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
742
742
  </footer>
743
743
 
744
744
  <script>prettyPrint();</script>
@@ -100,7 +100,7 @@
100
100
 
101
101
  <dt class="tag-source">Source:</dt>
102
102
  <dd class="tag-source"><ul class="dummy"><li>
103
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line498">line 498</a>
103
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line461">line 461</a>
104
104
  </li></ul></dd>
105
105
 
106
106
 
@@ -593,7 +593,7 @@ The filter options are dynamically generated based on the provided filters, styl
593
593
 
594
594
  <dt class="tag-source">Source:</dt>
595
595
  <dd class="tag-source"><ul class="dummy"><li>
596
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line637">line 637</a>
596
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line600">line 600</a>
597
597
  </li></ul></dd>
598
598
 
599
599
 
@@ -935,7 +935,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
935
935
 
936
936
  <dt class="tag-source">Source:</dt>
937
937
  <dd class="tag-source"><ul class="dummy"><li>
938
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line213">line 213</a>
938
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line176">line 176</a>
939
939
  </li></ul></dd>
940
940
 
941
941
 
@@ -1401,7 +1401,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
1401
1401
 
1402
1402
  <dt class="tag-source">Source:</dt>
1403
1403
  <dd class="tag-source"><ul class="dummy"><li>
1404
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line64">line 64</a>
1404
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line52">line 52</a>
1405
1405
  </li></ul></dd>
1406
1406
 
1407
1407
 
@@ -1566,7 +1566,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
1566
1566
 
1567
1567
  <dt class="tag-source">Source:</dt>
1568
1568
  <dd class="tag-source"><ul class="dummy"><li>
1569
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line431">line 431</a>
1569
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line394">line 394</a>
1570
1570
  </li></ul></dd>
1571
1571
 
1572
1572
 
@@ -1731,7 +1731,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
1731
1731
 
1732
1732
  <dt class="tag-source">Source:</dt>
1733
1733
  <dd class="tag-source"><ul class="dummy"><li>
1734
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line457">line 457</a>
1734
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line420">line 420</a>
1735
1735
  </li></ul></dd>
1736
1736
 
1737
1737
 
@@ -1896,7 +1896,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
1896
1896
 
1897
1897
  <dt class="tag-source">Source:</dt>
1898
1898
  <dd class="tag-source"><ul class="dummy"><li>
1899
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line680">line 680</a>
1899
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line643">line 643</a>
1900
1900
  </li></ul></dd>
1901
1901
 
1902
1902
 
@@ -2054,7 +2054,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
2054
2054
 
2055
2055
  <dt class="tag-source">Source:</dt>
2056
2056
  <dd class="tag-source"><ul class="dummy"><li>
2057
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line758">line 758</a>
2057
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line721">line 721</a>
2058
2058
  </li></ul></dd>
2059
2059
 
2060
2060
 
@@ -2223,7 +2223,7 @@ ongoing based on the event's duration (`length_in_seconds`).</li></ul></dd>
2223
2223
 
2224
2224
  <dt class="tag-source">Source:</dt>
2225
2225
  <dd class="tag-source"><ul class="dummy"><li>
2226
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line345">line 345</a>
2226
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line308">line 308</a>
2227
2227
  </li></ul></dd>
2228
2228
 
2229
2229
 
@@ -2389,7 +2389,7 @@ fetchLiveEvent('drumeo')
2389
2389
 
2390
2390
  <dt class="tag-source">Source:</dt>
2391
2391
  <dd class="tag-source"><ul class="dummy"><li>
2392
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line722">line 722</a>
2392
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line685">line 685</a>
2393
2393
  </li></ul></dd>
2394
2394
 
2395
2395
 
@@ -2547,7 +2547,7 @@ fetchLiveEvent('drumeo')
2547
2547
 
2548
2548
  <dt class="tag-source">Source:</dt>
2549
2549
  <dd class="tag-source"><ul class="dummy"><li>
2550
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line701">line 701</a>
2550
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line664">line 664</a>
2551
2551
  </li></ul></dd>
2552
2552
 
2553
2553
 
@@ -2705,7 +2705,7 @@ fetchLiveEvent('drumeo')
2705
2705
 
2706
2706
  <dt class="tag-source">Source:</dt>
2707
2707
  <dd class="tag-source"><ul class="dummy"><li>
2708
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line302">line 302</a>
2708
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line265">line 265</a>
2709
2709
  </li></ul></dd>
2710
2710
 
2711
2711
 
@@ -2863,7 +2863,7 @@ fetchLiveEvent('drumeo')
2863
2863
 
2864
2864
  <dt class="tag-source">Source:</dt>
2865
2865
  <dd class="tag-source"><ul class="dummy"><li>
2866
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line732">line 732</a>
2866
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line695">line 695</a>
2867
2867
  </li></ul></dd>
2868
2868
 
2869
2869
 
@@ -3021,7 +3021,7 @@ fetchLiveEvent('drumeo')
3021
3021
 
3022
3022
  <dt class="tag-source">Source:</dt>
3023
3023
  <dd class="tag-source"><ul class="dummy"><li>
3024
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line812">line 812</a>
3024
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line775">line 775</a>
3025
3025
  </li></ul></dd>
3026
3026
 
3027
3027
 
@@ -3179,7 +3179,7 @@ fetchLiveEvent('drumeo')
3179
3179
 
3180
3180
  <dt class="tag-source">Source:</dt>
3181
3181
  <dd class="tag-source"><ul class="dummy"><li>
3182
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line838">line 838</a>
3182
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line801">line 801</a>
3183
3183
  </li></ul></dd>
3184
3184
 
3185
3185
 
@@ -3344,7 +3344,7 @@ fetchLiveEvent('drumeo')
3344
3344
 
3345
3345
  <dt class="tag-source">Source:</dt>
3346
3346
  <dd class="tag-source"><ul class="dummy"><li>
3347
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line791">line 791</a>
3347
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line754">line 754</a>
3348
3348
  </li></ul></dd>
3349
3349
 
3350
3350
 
@@ -3526,7 +3526,7 @@ fetchLiveEvent('drumeo')
3526
3526
 
3527
3527
  <dt class="tag-source">Source:</dt>
3528
3528
  <dd class="tag-source"><ul class="dummy"><li>
3529
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line95">line 95</a>
3529
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line83">line 83</a>
3530
3530
  </li></ul></dd>
3531
3531
 
3532
3532
 
@@ -3715,7 +3715,7 @@ fetchLiveEvent('drumeo')
3715
3715
 
3716
3716
  <dt class="tag-source">Source:</dt>
3717
3717
  <dd class="tag-source"><ul class="dummy"><li>
3718
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line855">line 855</a>
3718
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line818">line 818</a>
3719
3719
  </li></ul></dd>
3720
3720
 
3721
3721
 
@@ -3905,7 +3905,7 @@ fetchSanity(query, true)
3905
3905
 
3906
3906
  <dt class="tag-source">Source:</dt>
3907
3907
  <dd class="tag-source"><ul class="dummy"><li>
3908
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line78">line 78</a>
3908
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line66">line 66</a>
3909
3909
  </li></ul></dd>
3910
3910
 
3911
3911
 
@@ -4228,7 +4228,7 @@ fetchSanity(query, true)
4228
4228
 
4229
4229
  <dt class="tag-source">Source:</dt>
4230
4230
  <dd class="tag-source"><ul class="dummy"><li>
4231
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line264">line 264</a>
4231
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line227">line 227</a>
4232
4232
  </li></ul></dd>
4233
4233
 
4234
4234
 
@@ -4386,7 +4386,7 @@ fetchSanity(query, true)
4386
4386
 
4387
4387
  <dt class="tag-source">Source:</dt>
4388
4388
  <dd class="tag-source"><ul class="dummy"><li>
4389
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line235">line 235</a>
4389
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line198">line 198</a>
4390
4390
  </li></ul></dd>
4391
4391
 
4392
4392
 
@@ -4551,7 +4551,7 @@ fetchSanity(query, true)
4551
4551
 
4552
4552
  <dt class="tag-source">Source:</dt>
4553
4553
  <dd class="tag-source"><ul class="dummy"><li>
4554
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line392">line 392</a>
4554
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line355">line 355</a>
4555
4555
  </li></ul></dd>
4556
4556
 
4557
4557
 
@@ -4717,7 +4717,7 @@ This function retrieves the latest workout content for a given brand, fetching u
4717
4717
 
4718
4718
  <dt class="tag-source">Source:</dt>
4719
4719
  <dd class="tag-source"><ul class="dummy"><li>
4720
- <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line280">line 280</a>
4720
+ <a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line243">line 243</a>
4721
4721
  </li></ul></dd>
4722
4722
 
4723
4723
 
@@ -4881,7 +4881,7 @@ This function retrieves the latest workout content for a given brand, fetching u
4881
4881
  <br class="clear">
4882
4882
 
4883
4883
  <footer>
4884
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
4884
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 17:42:41 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
4885
4885
  </footer>
4886
4886
 
4887
4887
  <script>prettyPrint();</script>
@@ -74,8 +74,13 @@ export async function fetchCurrentSongComplete(content_id) {
74
74
  try {
75
75
  const response = await fetch(url, { headers });
76
76
  const result = await response.json();
77
- if(result){
78
- return result[globalConfig.railcontentConfig.userId];
77
+
78
+ if (result &amp;&amp; result[content_id]) {
79
+ console.log('result', result[content_id]);
80
+ return result[content_id]; // Return the correct object
81
+ } else {
82
+ console.log('Invalid result structure', result);
83
+ return null; // Handle unexpected structure
79
84
  }
80
85
  } catch (error) {
81
86
  console.error('Fetch error:', error);
@@ -83,6 +88,7 @@ export async function fetchCurrentSongComplete(content_id) {
83
88
  }
84
89
  }
85
90
 
91
+
86
92
  /**
87
93
  * Fetches the completion status for multiple songs for the current user.
88
94
  *
@@ -165,7 +171,7 @@ export async function fetchSongsInProgress(brand) {
165
171
  <br class="clear">
166
172
 
167
173
  <footer>
168
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
174
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 17:42:41 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
169
175
  </footer>
170
176
 
171
177
  <script>prettyPrint();</script>
@@ -65,36 +65,24 @@ import { fetchAllCompletedStates, fetchCurrentSongComplete } from './railcontent
65
65
  * .then(song => console.log(song))
66
66
  * .catch(error => console.error(error));
67
67
  */
68
- export async function fetchSongById(songId) {
69
- const query = `
70
- *[_type == "song" &amp;&amp; railcontent_id == ${songId}]{
71
- title,
72
- "thumbnail_url": thumbnail.asset->url,
73
- "style": genre[0]->name,
74
- "artist": artist->name,
75
- album,
76
- instrumentless,
77
- soundslice,
78
- railcontent_id,
79
- "resources": resource[]{resource_url, resource_name},
80
- }`;
81
-
82
- const songData = await fetchSanity(query, false);
83
-
84
- // Check if the necessary user information is available in globalConfig
85
- if (!songData || !globalConfig.railcontentConfig.userId || !globalConfig.railcontentConfig.token) {
86
- return songData;
87
- }
68
+ export async function fetchSongById(documentId) {
69
+ const fields = [
70
+ 'title',
71
+ '"thumbnail_url": thumbnail.asset->url',
72
+ '"style": genre[0]->name',
73
+ '"artist": artist->name',
74
+ 'album',
75
+ 'instrumentless',
76
+ 'soundslice',
77
+ '"resources": resource[]{resource_url, resource_name}',
78
+ ];
88
79
 
89
- // Fetch the completion state for the current song
90
- const currentSongComplete = await fetchCurrentSongComplete(songId);
91
-
92
- if (currentSongComplete) {
93
- songData.completed = currentSongComplete.state !== "not started";
94
- songData.progress_percent = currentSongComplete.percent.toString();
95
- }
96
-
97
- return songData;
80
+ const query = `
81
+ *[_type == "song" &amp;&amp; railcontent_id == ${documentId}]{
82
+ ${fields.join(', ')}
83
+ }`;
84
+
85
+ return fetchSanity(query, false);
98
86
  }
99
87
 
100
88
  /**
@@ -205,32 +193,7 @@ export async function fetchRelatedSongs(brand, songId) {
205
193
  }`;
206
194
 
207
195
  // Fetch the related songs data
208
- const relatedSongsData = await fetchSanity(query, true);
209
-
210
- if (!relatedSongsData || !userId || !token) {
211
- return relatedSongsData;
212
- }
213
-
214
- // Extract the IDs of related lessons
215
- const relatedLessonIds = relatedSongsData.data.map(lesson => lesson.id);
216
-
217
- // Fetch the completion states for the related lessons
218
- const relatedLessonsCompletionStates = await fetchAllCompletedStates(relatedLessonIds);
219
-
220
- // Map the completion states to the related lessons
221
- relatedSongsData.data = relatedSongsData.data.map(lesson => {
222
- const lessonCompletionState = relatedLessonsCompletionStates[lesson.id];
223
- if (lessonCompletionState) {
224
- return {
225
- ...lesson,
226
- completed: lessonCompletionState.state !== "not started",
227
- lesson_progress: lessonCompletionState.percent.toString()
228
- };
229
- }
230
- return lesson;
231
- });
232
-
233
- return relatedSongsData;
196
+ return fetchSanity(query, false);
234
197
  }
235
198
 
236
199
  /**
@@ -981,7 +944,7 @@ function checkSanityConfig(config) {
981
944
  <br class="clear">
982
945
 
983
946
  <footer>
984
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
947
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 17:42:41 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
985
948
  </footer>
986
949
 
987
950
  <script>prettyPrint();</script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -35,7 +35,7 @@ export async function fetchSongById(documentId) {
35
35
  ${fields.join(', ')}
36
36
  }`;
37
37
 
38
- return fetchSanity(query, true);
38
+ return fetchSanity(query, false);
39
39
  }
40
40
 
41
41
  /**
@@ -146,7 +146,7 @@ export async function fetchRelatedSongs(brand, songId) {
146
146
  }`;
147
147
 
148
148
  // Fetch the related songs data
149
- return fetchSanity(query, true);
149
+ return fetchSanity(query, false);
150
150
  }
151
151
 
152
152
  /**