musora-content-services 1.0.23 → 1.0.24

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,8 @@
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.24](https://github.com/railroadmedia/musora-content-services/compare/v1.0.23...v1.0.24) (2024-08-14)
6
+
5
7
  ### [1.0.23](https://github.com/railroadmedia/musora-content-services/compare/v1.0.22...v1.0.23) (2024-08-14)
6
8
 
7
9
  ### [1.0.22](https://github.com/railroadmedia/musora-content-services/compare/v1.0.21...v1.0.22) (2024-08-14)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -34,15 +34,10 @@ export async function fetchSongById(songId) {
34
34
 
35
35
  const songData = await fetchSanity(query, false);
36
36
 
37
- // Check if the necessary user information is available in globalConfig
38
- if (!songData || !globalConfig.railcontentConfig.userId || !globalConfig.railcontentConfig.token) {
39
- return songData;
40
- }
41
-
42
37
  // Fetch the completion state for the current song
43
38
  const currentSongComplete = await fetchCurrentSongComplete(songId);
44
39
 
45
- if (currentSongComplete) {
40
+ if (songData && currentSongComplete) {
46
41
  songData.completed = currentSongComplete.state !== "not started";
47
42
  songData.progress_percent = currentSongComplete.percent.toString();
48
43
  }