musora-content-services 1.0.235 → 1.0.236
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 +2 -0
- package/package.json +1 -1
- package/src/services/sanity.js +4 -3
- package/test/contentProgress.test.js +9 -9
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.236](https://github.com/railroadmedia/musora-content-services/compare/v1.0.235...v1.0.236) (2024-12-13)
|
|
6
|
+
|
|
5
7
|
### [1.0.235](https://github.com/railroadmedia/musora-content-services/compare/v1.0.234...v1.0.235) (2024-12-13)
|
|
6
8
|
|
|
7
9
|
### [1.0.234](https://github.com/railroadmedia/musora-content-services/compare/v1.0.233...v1.0.234) (2024-12-13)
|
package/package.json
CHANGED
package/src/services/sanity.js
CHANGED
|
@@ -518,12 +518,13 @@ export async function fetchAll(brand, type, {
|
|
|
518
518
|
const start = (page - 1) * limit;
|
|
519
519
|
const end = start + limit;
|
|
520
520
|
let bypassStatusAndPublishedValidation = (type == 'instructor' || groupBy == 'artist' || groupBy == 'genre' || groupBy == 'instructor');
|
|
521
|
-
|
|
521
|
+
let bypassPermissions = bypassStatusAndPublishedValidation;
|
|
522
522
|
// Construct the type filter
|
|
523
523
|
let typeFilter;
|
|
524
524
|
|
|
525
525
|
if( type === 'archives' ) {
|
|
526
|
-
typeFilter = `&& status == "archived"
|
|
526
|
+
typeFilter = `&& status == "archived"`;
|
|
527
|
+
bypassStatusAndPublishedValidation = true;
|
|
527
528
|
} else {
|
|
528
529
|
typeFilter = type ? `&& _type == '${type}'` : "";
|
|
529
530
|
}
|
|
@@ -598,7 +599,7 @@ export async function fetchAll(brand, type, {
|
|
|
598
599
|
|
|
599
600
|
const filterWithRestrictions = await new FilterBuilder(filter, {
|
|
600
601
|
bypassStatuses: bypassStatusAndPublishedValidation,
|
|
601
|
-
bypassPermissions:
|
|
602
|
+
bypassPermissions: bypassPermissions,
|
|
602
603
|
bypassPublishedDateRestriction: bypassStatusAndPublishedValidation
|
|
603
604
|
}).buildFilter();
|
|
604
605
|
query = buildEntityAndTotalQuery(
|
|
@@ -156,15 +156,15 @@ describe('contentProgressDataContext', function () {
|
|
|
156
156
|
});
|
|
157
157
|
|
|
158
158
|
|
|
159
|
-
test('recordWatchSession', async () => {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
});
|
|
159
|
+
// test('recordWatchSession', async () => {
|
|
160
|
+
// const contentId = 241250;
|
|
161
|
+
// let progress = await getProgressPercentage(contentId); //force load context
|
|
162
|
+
//
|
|
163
|
+
// await recordWatchSession(contentId, 'video', 'vimeo', 1673, 554, 5);
|
|
164
|
+
// progress = await getProgressPercentage(241250);
|
|
165
|
+
//
|
|
166
|
+
// expect(progress).toBe(33);
|
|
167
|
+
// });
|
|
168
168
|
// test('assignmentCompleteBubblingToCompleted', async () => {
|
|
169
169
|
// let assignmentId = 241685;
|
|
170
170
|
// let contentId = 241257;
|