musora-content-services 2.134.5 → 2.134.6
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 +8 -0
- package/package.json +1 -1
- package/src/services/content.js +8 -2
- package/src/services/sanity.js +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
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
|
+
### [2.134.6](https://github.com/railroadmedia/musora-content-services/compare/v2.134.5...v2.134.6) (2026-02-17)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* child cta for new releases ([#822](https://github.com/railroadmedia/musora-content-services/issues/822)) ([d0d2aae](https://github.com/railroadmedia/musora-content-services/commit/d0d2aae729050f918f3c9a6a4cceb4523c03ef70))
|
|
11
|
+
* return status field in response ([#823](https://github.com/railroadmedia/musora-content-services/issues/823)) ([371bbd3](https://github.com/railroadmedia/musora-content-services/commit/371bbd3a92ef99a4ae3454facb43135084943b7a))
|
|
12
|
+
|
|
5
13
|
### [2.134.5](https://github.com/railroadmedia/musora-content-services/compare/v2.134.4...v2.134.5) (2026-02-13)
|
|
6
14
|
|
|
7
15
|
|
package/package.json
CHANGED
package/src/services/content.js
CHANGED
|
@@ -438,12 +438,18 @@ export async function getScheduleContentRows(brand, contentRowId = null, { page
|
|
|
438
438
|
const pagination = isNewReleases ? { page: 1, limit: 30 } : { page: 1, limit: Number.MAX_SAFE_INTEGER };
|
|
439
439
|
const items = await section.fetchMethod(brand, pagination)
|
|
440
440
|
|
|
441
|
+
const content = await addContextToContent(() => items, {
|
|
442
|
+
addProgressPercentage: true,
|
|
443
|
+
addProgressStatus: true,
|
|
444
|
+
addNavigateTo: true,
|
|
445
|
+
})
|
|
446
|
+
|
|
441
447
|
return {
|
|
442
448
|
id,
|
|
443
449
|
title: section.title,
|
|
444
450
|
// TODO: Remove content after FE/MA updates the existing code to use items
|
|
445
|
-
content:
|
|
446
|
-
items:
|
|
451
|
+
content: content,
|
|
452
|
+
items: content
|
|
447
453
|
};
|
|
448
454
|
})
|
|
449
455
|
);
|
package/src/services/sanity.js
CHANGED
|
@@ -324,8 +324,12 @@ export async function fetchNewReleases(
|
|
|
324
324
|
const sortOrder = getSortOrder(sort, brand)
|
|
325
325
|
const now = getDateOnly()
|
|
326
326
|
const filter = `_type in ${typesString} && brand == '${brand}' && (status == 'published' && show_in_new_feed == true && published_on <= '${now}')`
|
|
327
|
-
|
|
327
|
+
|
|
328
|
+
let fields = await getFieldsForContentTypeWithFilteredChildren(null)
|
|
329
|
+
|
|
330
|
+
const entityFieldsString = `${fields}
|
|
328
331
|
"id": railcontent_id,
|
|
332
|
+
status,
|
|
329
333
|
title,
|
|
330
334
|
"image": thumbnail.asset->url,
|
|
331
335
|
"thumbnail": thumbnail.asset->url,
|
|
@@ -340,7 +344,7 @@ export async function fetchNewReleases(
|
|
|
340
344
|
web_url_path,
|
|
341
345
|
"permission_id": permission_v2,
|
|
342
346
|
`
|
|
343
|
-
const query = buildRawQuery(filter,
|
|
347
|
+
const query = buildRawQuery(filter, entityFieldsString, { sortOrder: sortOrder, start, end: end })
|
|
344
348
|
return fetchSanity(query, true)
|
|
345
349
|
}
|
|
346
350
|
|
|
@@ -364,6 +368,7 @@ export async function fetchUpcomingEvents(brand, { page = 1, limit = 10 } = {})
|
|
|
364
368
|
const end = start + limit
|
|
365
369
|
const fields = `
|
|
366
370
|
"id": railcontent_id,
|
|
371
|
+
status,
|
|
367
372
|
title,
|
|
368
373
|
"image": thumbnail.asset->url,
|
|
369
374
|
"thumbnail": thumbnail.asset->url,
|
|
@@ -417,6 +422,7 @@ export async function fetchScheduledReleases(brand, { page = 1, limit = 10 }) {
|
|
|
417
422
|
const end = start + limit
|
|
418
423
|
const query = `*[_type in [${typesString}] && brand == '${brand}' && status in ['published','scheduled'] && (!defined(live_event_end_time) || live_event_end_time < '${now}' ) && published_on > '${now}']{
|
|
419
424
|
"id": railcontent_id,
|
|
425
|
+
status,
|
|
420
426
|
title,
|
|
421
427
|
"image": thumbnail.asset->url,
|
|
422
428
|
"thumbnail": thumbnail.asset->url,
|