musora-content-services 2.3.8 → 2.3.11

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,12 @@
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
+ ### [2.3.11](https://github.com/railroadmedia/musora-content-services/compare/v2.3.9...v2.3.11) (2025-04-09)
6
+
7
+ ### [2.3.10](https://github.com/railroadmedia/musora-content-services/compare/v2.3.9...v2.3.10) (2025-04-08)
8
+
9
+ ### [2.3.9](https://github.com/railroadmedia/musora-content-services/compare/v2.3.8...v2.3.9) (2025-04-08)
10
+
5
11
  ### [2.3.8](https://github.com/railroadmedia/musora-content-services/compare/v2.3.7...v2.3.8) (2025-04-08)
6
12
 
7
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.3.8",
3
+ "version": "2.3.11",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.d.ts CHANGED
File without changes
package/src/index.js CHANGED
File without changes
File without changes
File without changes
@@ -120,8 +120,8 @@ export async function recommendations(brand, { section = ''} = {}) {
120
120
  try {
121
121
  return fetchJSONHandler(
122
122
  url,
123
- globalConfig.railcontentConfig.token,
124
- globalConfig.railcontentConfig.baseUrl,
123
+ globalConfig.sessionConfig.token,
124
+ globalConfig.baseUrl,
125
125
  'get'
126
126
  )
127
127
  } catch (error) {
@@ -133,8 +133,8 @@ export async function recommendations(brand, { section = ''} = {}) {
133
133
  async function fetchHandler(url, method = 'get', body = null) {
134
134
  return fetchJSONHandler(
135
135
  url,
136
- globalConfig.recommendationsConfig.token,
137
- globalConfig.recommendationsConfig.baseUrl,
136
+ globalConfig.sessionConfig.token,
137
+ globalConfig.baseUrl,
138
138
  method,
139
139
  null,
140
140
  body
@@ -345,15 +345,18 @@ export async function deletePracticeSession(day) {
345
345
  if (!userPracticesIds.length) return [];
346
346
 
347
347
  const url = `/api/user/practices/v1/practices${buildQueryString(userPracticesIds)}`;
348
- await userActivityContext.update(async function (localContext) {
349
- if (localContext.data?.[DATA_KEY_PRACTICES]?.[day]) {
350
- localContext.data[DATA_KEY_PRACTICES][day] = localContext.data[DATA_KEY_PRACTICES][day].filter(
351
- practice => !userPracticesIds.includes(practice.id)
352
- );
348
+ await userActivityContext.update(
349
+ async function (localContext) {
350
+ if (localContext.data?.[DATA_KEY_PRACTICES]?.[day]) {
351
+ localContext.data[DATA_KEY_PRACTICES][day] = localContext.data[DATA_KEY_PRACTICES][day].filter(
352
+ practice => !userPracticesIds.includes(practice.id)
353
+ );
354
+ }
355
+ },
356
+ async function () {
357
+ return await fetchHandler(url, 'DELETE', null);
353
358
  }
354
- });
355
-
356
- return await fetchHandler(url, 'DELETE', null);
359
+ );
357
360
  }
358
361
 
359
362
  export async function restorePracticeSession(date) {