musora-content-services 1.0.51 → 1.0.53
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/package.json +1 -1
- package/src/services/sanity.js +7 -4
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.53](https://github.com/railroadmedia/musora-content-services/compare/v1.0.52...v1.0.53) (2024-08-23)
|
|
6
|
+
|
|
7
|
+
### [1.0.52](https://github.com/railroadmedia/musora-content-services/compare/v1.0.51...v1.0.52) (2024-08-23)
|
|
8
|
+
|
|
5
9
|
### [1.0.51](https://github.com/railroadmedia/musora-content-services/compare/v1.0.50...v1.0.51) (2024-08-23)
|
|
6
10
|
|
|
7
11
|
### [1.0.50](https://github.com/railroadmedia/musora-content-services/compare/v1.0.49...v1.0.50) (2024-08-23)
|
package/package.json
CHANGED
package/src/services/sanity.js
CHANGED
|
@@ -483,7 +483,8 @@ export async function fetchAll(brand, type, {
|
|
|
483
483
|
'difficulty',
|
|
484
484
|
'difficulty_string',
|
|
485
485
|
'web_url_path',
|
|
486
|
-
'published_on'
|
|
486
|
+
'published_on'
|
|
487
|
+
];
|
|
487
488
|
|
|
488
489
|
let fields = defaultFields.concat(additionalFields);
|
|
489
490
|
let fieldsString = fields.join(',');
|
|
@@ -635,20 +636,22 @@ export async function fetchChildren(railcontentId) {
|
|
|
635
636
|
* @returns {Promise<Object|null>} - The fetched methods data or null if not found.
|
|
636
637
|
*/
|
|
637
638
|
export async function fetchMethods(brand) {
|
|
638
|
-
const query = `*[_type == 'learning-path' && brand ==
|
|
639
|
-
child_count,
|
|
639
|
+
const query = `*[_type == 'learning-path' && brand == ${drumeo}] {
|
|
640
640
|
difficulty,
|
|
641
|
+
difficulty_string,
|
|
641
642
|
"description": description[0].children[0].text,
|
|
642
643
|
hide_from_recsys,
|
|
644
|
+
"image": thumbnail.asset->url,
|
|
643
645
|
"instructors":instructor[]->name,
|
|
646
|
+
"lesson_count": child_count,
|
|
644
647
|
length_in_seconds,
|
|
645
648
|
permission,
|
|
646
649
|
popularity,
|
|
650
|
+
"position": count(*[_type == 'learning-path' && brand == "drumeo"]) - count(*[_type == 'learning-path' && brand == "drumeo" && published_on > ^.published_on]),
|
|
647
651
|
published_on,
|
|
648
652
|
railcontent_id,
|
|
649
653
|
"slug": slug.current,
|
|
650
654
|
status,
|
|
651
|
-
"thumbnail": thumbnail.asset->url,
|
|
652
655
|
"thumbnail_logo": logo_image_url.asset->url,
|
|
653
656
|
title,
|
|
654
657
|
total_xp,
|