musora-content-services 1.0.119 → 1.0.120
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.120](https://github.com/railroadmedia/musora-content-services/compare/v1.0.119...v1.0.120) (2024-09-30)
|
|
6
|
+
|
|
5
7
|
### [1.0.119](https://github.com/railroadmedia/musora-content-services/compare/v1.0.118...v1.0.119) (2024-09-27)
|
|
6
8
|
|
|
7
9
|
### [1.0.118](https://github.com/railroadmedia/musora-content-services/compare/v1.0.117...v1.0.118) (2024-09-27)
|
package/package.json
CHANGED
package/src/contentTypeConfig.js
CHANGED
|
@@ -95,6 +95,11 @@ let contentTypeConfig = {
|
|
|
95
95
|
'"instructors": instructor[]->name',
|
|
96
96
|
'"header_image_url": thumbnail.asset->url',
|
|
97
97
|
'"logo_image_url": logo_image_url.asset->url',
|
|
98
|
+
'"award": award.asset->url',
|
|
99
|
+
`"award_template": award_template[]{
|
|
100
|
+
streak_minimum,
|
|
101
|
+
"template" : template.asset->url,
|
|
102
|
+
}`,
|
|
98
103
|
]
|
|
99
104
|
},
|
|
100
105
|
'course': {
|
package/src/filterBuilder.js
CHANGED
|
@@ -22,7 +22,8 @@ export class FilterBuilder {
|
|
|
22
22
|
this.getFutureContentOnly = getFutureContentOnly;
|
|
23
23
|
this.getFutureScheduledContentsOnly = getFutureScheduledContentsOnly;
|
|
24
24
|
this.filter = filter;
|
|
25
|
-
this.debug = process.env.DEBUG === 'true' || false;
|
|
25
|
+
// this.debug = process.env.DEBUG === 'true' || false;
|
|
26
|
+
this.debug = false;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
|
package/src/services/sanity.js
CHANGED
|
@@ -873,7 +873,7 @@ export async function fetchLessonContent(railContentId) {
|
|
|
873
873
|
"thumbnail_url":thumbnail.asset->url,
|
|
874
874
|
"url": web_url_path,
|
|
875
875
|
soundslice_slug,
|
|
876
|
-
description,
|
|
876
|
+
"description": description[0].children[0].text,
|
|
877
877
|
"chapters": chapter[]{
|
|
878
878
|
chapter_description,
|
|
879
879
|
chapter_timecode,
|
|
@@ -889,6 +889,7 @@ export async function fetchLessonContent(railContentId) {
|
|
|
889
889
|
"id":_id,
|
|
890
890
|
name,
|
|
891
891
|
short_bio,
|
|
892
|
+
"biography": short_bio[0].children[0].text,
|
|
892
893
|
web_url_path,
|
|
893
894
|
"coach_card_image": coach_card_image.asset->url,
|
|
894
895
|
},
|
|
@@ -1072,6 +1073,8 @@ export async function fetchChallengeOverview(id) {
|
|
|
1072
1073
|
difficulty_string,
|
|
1073
1074
|
difficulty,
|
|
1074
1075
|
"type": _type,
|
|
1076
|
+
is_always_unlocked,
|
|
1077
|
+
is_bonus_content,
|
|
1075
1078
|
}
|
|
1076
1079
|
} [0...1]`;
|
|
1077
1080
|
return fetchSanity(query, false);
|
|
@@ -433,6 +433,16 @@ describe('Sanity Queries', function () {
|
|
|
433
433
|
expect(response.tabs.length).toBeGreaterThan(0);
|
|
434
434
|
});
|
|
435
435
|
|
|
436
|
+
test('fetchChallengesV2Fields', async () => {
|
|
437
|
+
const id = 402197;
|
|
438
|
+
const response = await fetchChallengeOverview(id);
|
|
439
|
+
log(response);
|
|
440
|
+
expect(response.award).toBeDefined();
|
|
441
|
+
expect(response.award_template).toBeDefined();
|
|
442
|
+
expect(response.lessons[0].is_always_unlocked).toBeDefined();
|
|
443
|
+
expect(response.lessons[0].is_bonus_content).toBeDefined();
|
|
444
|
+
});
|
|
445
|
+
|
|
436
446
|
});
|
|
437
447
|
|
|
438
448
|
describe('Filter Builder', function () {
|
|
@@ -618,6 +628,7 @@ describe('Filter Builder', function () {
|
|
|
618
628
|
});
|
|
619
629
|
});
|
|
620
630
|
|
|
631
|
+
|
|
621
632
|
describe('MetaData', function () {
|
|
622
633
|
|
|
623
634
|
test('customBrandTypeExists', async () => {
|