musora-content-services 1.0.168 → 1.0.169
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.169](https://github.com/railroadmedia/musora-content-services/compare/v1.0.168...v1.0.169) (2024-11-11)
|
|
6
|
+
|
|
5
7
|
### [1.0.168](https://github.com/railroadmedia/musora-content-services/compare/v1.0.167...v1.0.168) (2024-11-11)
|
|
6
8
|
|
|
7
9
|
### [1.0.167](https://github.com/railroadmedia/musora-content-services/compare/v1.0.166...v1.0.167) (2024-11-11)
|
package/package.json
CHANGED
package/src/services/sanity.js
CHANGED
|
@@ -1452,7 +1452,13 @@ export async function fetchCommentModContentData(ids) {
|
|
|
1452
1452
|
let data = await fetchSanity(query, true);
|
|
1453
1453
|
let mapped = {};
|
|
1454
1454
|
data.forEach(function (content) {
|
|
1455
|
-
mapped[content.id] = {
|
|
1455
|
+
mapped[content.id] = {
|
|
1456
|
+
"id": content.id,
|
|
1457
|
+
"type": content.type,
|
|
1458
|
+
"title": content.title,
|
|
1459
|
+
"url": content.url,
|
|
1460
|
+
"parentTitle": content.parent[0]?.title ?? null
|
|
1461
|
+
};
|
|
1456
1462
|
});
|
|
1457
1463
|
return mapped;
|
|
1458
1464
|
}
|
|
@@ -576,6 +576,7 @@ describe('Sanity Queries', function () {
|
|
|
576
576
|
let data = await fetchCommentModContentData([241251,241252, 211153]);
|
|
577
577
|
expect(data[241251].title).toBe("Setting Up Your Space");
|
|
578
578
|
expect(data[241251].type).toBe("learning-path-lesson");
|
|
579
|
+
expect(data[241251].url).toBe( "/drumeo/method/drumeo-method/241247/getting-started-on-the-drums/241248/gear/241249/setting-up-your-space/241251");
|
|
579
580
|
expect(data[241251].parentTitle).toBe("Gear");
|
|
580
581
|
expect(data[241252].title).toBe("Setting Up Your Pedals & Throne");
|
|
581
582
|
});
|