musora-content-services 1.0.24 → 1.0.25

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.25](https://github.com/railroadmedia/musora-content-services/compare/v1.0.24...v1.0.25) (2024-08-14)
6
+
5
7
  ### [1.0.24](https://github.com/railroadmedia/musora-content-services/compare/v1.0.23...v1.0.24) (2024-08-14)
6
8
 
7
9
  ### [1.0.23](https://github.com/railroadmedia/musora-content-services/compare/v1.0.22...v1.0.23) (2024-08-14)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -23,11 +23,11 @@ export async function fetchCurrentSongComplete(content_id) {
23
23
  'Content-Type': 'application/json',
24
24
  'X-CSRF-TOKEN': globalConfig.railcontentConfig.token
25
25
  };
26
-
27
26
  try {
28
27
  const response = await fetch(url, { headers });
29
28
  const result = await response.json();
30
29
  if(result){
30
+ console.log('result', result[globalConfig.railcontentConfig.userId])
31
31
  return result[globalConfig.railcontentConfig.userId];
32
32
  }
33
33
  } catch (error) {
@@ -38,10 +38,16 @@ export async function fetchSongById(songId) {
38
38
  const currentSongComplete = await fetchCurrentSongComplete(songId);
39
39
 
40
40
  if (songData && currentSongComplete) {
41
- songData.completed = currentSongComplete.state !== "not started";
42
- songData.progress_percent = currentSongComplete.percent.toString();
41
+ console.log('song data', songData);
42
+ console.log('currentSongComplete', currentSongComplete);
43
+ songData.completed = currentSongComplete.state !== "not started";
44
+ songData.progress_percent = currentSongComplete.percent.toString();
45
+ } else {
46
+ console.log('no song data', songData);
47
+ console.log('no currentSongComplete', currentSongComplete);
43
48
  }
44
-
49
+
50
+ console.log('all songData', songData)
45
51
  return songData;
46
52
  }
47
53