musora-content-services 1.0.243 → 1.0.246
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
|
+
### [1.0.246](https://github.com/railroadmedia/musora-content-services/compare/v1.0.245...v1.0.246) (2024-12-18)
|
|
6
|
+
|
|
7
|
+
### [1.0.245](https://github.com/railroadmedia/musora-content-services/compare/v1.0.244...v1.0.245) (2024-12-18)
|
|
8
|
+
|
|
9
|
+
### [1.0.244](https://github.com/railroadmedia/musora-content-services/compare/v1.0.243...v1.0.244) (2024-12-18)
|
|
10
|
+
|
|
5
11
|
### [1.0.243](https://github.com/railroadmedia/musora-content-services/compare/v1.0.242...v1.0.243) (2024-12-18)
|
|
6
12
|
|
|
7
13
|
### [1.0.242](https://github.com/railroadmedia/musora-content-services/compare/v1.0.241...v1.0.242) (2024-12-17)
|
package/package.json
CHANGED
package/src/contentMetaData.js
CHANGED
|
@@ -241,7 +241,6 @@ const commonMetadata ={
|
|
|
241
241
|
description: 'Here\'s a list of all lessons recently added to Drumeo. Browse on your own or use search to find whatever it is you\'d like to learn!',
|
|
242
242
|
allowableFilters: ['type'],
|
|
243
243
|
sortBy: '-published_on',
|
|
244
|
-
shortname: 'Lessons',
|
|
245
244
|
tabs: [
|
|
246
245
|
{
|
|
247
246
|
name: 'Lessons',
|
package/src/services/sanity.js
CHANGED
|
@@ -1268,7 +1268,7 @@ export async function fetchRelatedMethodLessons(railContentId, brand) {
|
|
|
1268
1268
|
*/
|
|
1269
1269
|
export async function fetchAllPacks(brand, sort = "-published_on", searchTerm = "", page = 1, limit = 10) {
|
|
1270
1270
|
const sortOrder = getSortOrder(sort, brand);
|
|
1271
|
-
const filter = `_type == 'pack' && brand == '${brand}' && title match "${searchTerm}*"`
|
|
1271
|
+
const filter = `(_type == 'pack' || _type == 'semester-pack') && brand == '${brand}' && title match "${searchTerm}*"`
|
|
1272
1272
|
const filterParams = {};
|
|
1273
1273
|
const fields = getFieldsForContentType('pack');
|
|
1274
1274
|
const start = (page - 1) * limit;
|
|
@@ -1293,8 +1293,8 @@ export async function fetchAllPacks(brand, sort = "-published_on", searchTerm =
|
|
|
1293
1293
|
* @param {string} railcontentId - The Railcontent ID of the pack.
|
|
1294
1294
|
* @returns {Promise<Array<Object>|null>} - The fetched pack content data or null if not found.
|
|
1295
1295
|
*/
|
|
1296
|
-
export async function fetchPackAll(railcontentId) {
|
|
1297
|
-
return fetchByRailContentId(railcontentId,
|
|
1296
|
+
export async function fetchPackAll(railcontentId, type = 'pack') {
|
|
1297
|
+
return fetchByRailContentId(railcontentId, type);
|
|
1298
1298
|
}
|
|
1299
1299
|
|
|
1300
1300
|
export async function fetchLiveEvent(brand) {
|
|
@@ -1325,7 +1325,7 @@ export async function fetchLiveEvent(brand) {
|
|
|
1325
1325
|
// See LiveStreamEventService.getCurrentOrNextLiveEvent for some nice complicated logic which I don't think is actually importart
|
|
1326
1326
|
// this has some +- on times
|
|
1327
1327
|
// But this query just finds the first scheduled event (sorted by start_time) that ends after now()
|
|
1328
|
-
const query = `*[status == 'scheduled' && defined(live_event_start_time) && live_event_start_time <= '${getSanityDate(startDateTemp, false)}' && live_event_end_time >= '${getSanityDate(endDateTemp, false)}']{
|
|
1328
|
+
const query = `*[status == 'scheduled' && brand == '${brand}' && defined(live_event_start_time) && live_event_start_time <= '${getSanityDate(startDateTemp, false)}' && live_event_end_time >= '${getSanityDate(endDateTemp, false)}']{
|
|
1329
1329
|
'slug': slug.current,
|
|
1330
1330
|
'id': railcontent_id,
|
|
1331
1331
|
live_event_start_time,
|
|
@@ -678,8 +678,8 @@ describe('Sanity Queries', function () {
|
|
|
678
678
|
});
|
|
679
679
|
|
|
680
680
|
test('fetchTopLeveldrafts', async () => {
|
|
681
|
-
let id = await fetchTopLevelParentId(
|
|
682
|
-
expect(id).toBe(
|
|
681
|
+
let id = await fetchTopLevelParentId(401999);
|
|
682
|
+
expect(id).toBe(401999);
|
|
683
683
|
});
|
|
684
684
|
|
|
685
685
|
test('fetchCommentData', async()=>{
|