musora-content-services 1.0.211 → 1.0.213
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 +4 -0
- package/README.md +0 -0
- package/jest.config.js +0 -0
- package/package.json +1 -1
- package/src/contentMetaData.js +0 -1
- package/src/services/config.js +0 -0
- package/src/services/contentLikes.js +0 -0
- package/src/services/lastUpdated.js +0 -0
- package/src/services/railcontent.js +7 -0
- package/src/services/sanity.js +2 -2
- package/src/services/userPermissions.js +0 -0
- package/test/contentLikes.test.js +0 -0
- package/test/initializeTests.js +0 -0
- package/test/lastUpdated.test.js +0 -0
- package/test/localStorageMock.js +0 -0
- package/test/log.js +0 -0
- package/test/userPermissions.test.js +0 -0
- package/tools/generate-index.js +0 -0
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.213](https://github.com/railroadmedia/musora-content-services/compare/v1.0.212...v1.0.213) (2024-12-04)
|
|
6
|
+
|
|
7
|
+
### [1.0.212](https://github.com/railroadmedia/musora-content-services/compare/v1.0.211...v1.0.212) (2024-12-03)
|
|
8
|
+
|
|
5
9
|
### [1.0.211](https://github.com/railroadmedia/musora-content-services/compare/v1.0.210...v1.0.211) (2024-12-03)
|
|
6
10
|
|
|
7
11
|
### [1.0.210](https://github.com/railroadmedia/musora-content-services/compare/v1.0.209...v1.0.210) (2024-12-02)
|
package/README.md
CHANGED
|
File without changes
|
package/jest.config.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/contentMetaData.js
CHANGED
package/src/services/config.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -254,6 +254,7 @@ async function postDataHandler(url, data) {
|
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
export async function fetchHandler(url, method = "get", dataVersion = null, body = null) {
|
|
257
|
+
const params = new URLSearchParams(window.location.search);
|
|
257
258
|
let headers = {
|
|
258
259
|
'Content-Type': 'application/json',
|
|
259
260
|
'X-CSRF-TOKEN': globalConfig.railcontentConfig.token,
|
|
@@ -261,6 +262,12 @@ export async function fetchHandler(url, method = "get", dataVersion = null, body
|
|
|
261
262
|
if (globalConfig.railcontentConfig.authToken) {
|
|
262
263
|
headers['Authorization'] = `Bearer ${globalConfig.railcontentConfig.authToken}`;
|
|
263
264
|
}
|
|
265
|
+
if (params.get('testNow')) {
|
|
266
|
+
headers['testNow'] = params.get('testNow');
|
|
267
|
+
}
|
|
268
|
+
if (params.get('timezone')) {
|
|
269
|
+
headers['M-Client-Timezone'] = params.get('timezone');
|
|
270
|
+
}
|
|
264
271
|
if (dataVersion) headers['Data-Version'] = dataVersion;
|
|
265
272
|
const options = {
|
|
266
273
|
method,
|
package/src/services/sanity.js
CHANGED
|
@@ -567,7 +567,7 @@ export async function fetchAll(brand, type, {
|
|
|
567
567
|
${groupBy}
|
|
568
568
|
}[0...20]
|
|
569
569
|
`;
|
|
570
|
-
filter = `_type == '${groupBy}' && count(*[
|
|
570
|
+
filter = `_type == '${groupBy}' && count(*[${lessonsFilter}]._id) > 0`;
|
|
571
571
|
} else if (groupBy !== "") {
|
|
572
572
|
const webUrlPath = (groupBy == 'genre') ? '/genres' : '';
|
|
573
573
|
const lessonsFilter = `brand == '${brand}' && ^._id in ${groupBy}[]._ref ${typeFilter} ${searchFilter} ${includedFieldsFilter} ${progressFilter} ${customFilter}`;
|
|
@@ -584,7 +584,7 @@ export async function fetchAll(brand, type, {
|
|
|
584
584
|
${fieldsString},
|
|
585
585
|
${groupBy}
|
|
586
586
|
}[0...20]`;
|
|
587
|
-
filter = `_type == '${groupBy}' && count(*[
|
|
587
|
+
filter = `_type == '${groupBy}' && count(*[${lessonsFilter}]._id) > 0`;
|
|
588
588
|
} else {
|
|
589
589
|
filter = `brand == "${brand}" ${typeFilter} ${searchFilter} ${includedFieldsFilter} ${progressFilter} ${customFilter}`
|
|
590
590
|
entityFieldsString = fieldsString;
|
|
File without changes
|
|
File without changes
|
package/test/initializeTests.js
CHANGED
|
File without changes
|
package/test/lastUpdated.test.js
CHANGED
|
File without changes
|
package/test/localStorageMock.js
CHANGED
|
File without changes
|
package/test/log.js
CHANGED
|
File without changes
|
|
File without changes
|
package/tools/generate-index.js
CHANGED
|
File without changes
|