musora-content-services 2.99.4 → 2.99.5
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,13 @@
|
|
|
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.99.5](https://github.com/railroadmedia/musora-content-services/compare/v2.99.4...v2.99.5) (2025-12-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* daily session created when method intro video completed ([#636](https://github.com/railroadmedia/musora-content-services/issues/636)) ([fdfbb62](https://github.com/railroadmedia/musora-content-services/commit/fdfbb6287348307920ec50b798a0f14520fe4f10))
|
|
11
|
+
|
|
5
12
|
### [2.99.4](https://github.com/railroadmedia/musora-content-services/compare/v2.99.3...v2.99.4) (2025-12-09)
|
|
6
13
|
|
|
7
14
|
### [2.99.3](https://github.com/railroadmedia/musora-content-services/compare/v2.99.2...v2.99.3) (2025-12-09)
|
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ import { COLLECTION_TYPE, STATE } from '../sync/models/ContentProgress'
|
|
|
16
16
|
import { SyncWriteDTO } from '../sync'
|
|
17
17
|
import { ContentProgress } from '../sync/models'
|
|
18
18
|
import { CollectionParameter } from '../sync/repositories/content-progress'
|
|
19
|
+
import { getToday } from "../dateUtils.js";
|
|
19
20
|
|
|
20
21
|
const BASE_PATH: string = `/api/content-org`
|
|
21
22
|
const LEARNING_PATHS_PATH = `${BASE_PATH}/v1/user/learning-paths`
|
|
@@ -315,13 +316,22 @@ export async function completeMethodIntroVideo(
|
|
|
315
316
|
response.intro_video_response = await completeIfNotCompleted(introVideoId)
|
|
316
317
|
|
|
317
318
|
const methodStructure = await fetchMethodV2Structure(brand)
|
|
318
|
-
const
|
|
319
|
+
const firstLearningPathId = methodStructure.learning_paths[0].id
|
|
319
320
|
|
|
320
|
-
response.active_path_response = await
|
|
321
|
+
response.active_path_response = await methodIntroVideoCompleteActions(brand, firstLearningPathId, getToday())
|
|
321
322
|
|
|
322
323
|
return response
|
|
323
324
|
}
|
|
324
325
|
|
|
326
|
+
async function methodIntroVideoCompleteActions(brand: string, learningPathId: number, userDate: Date) {
|
|
327
|
+
const stringDate = userDate.toISOString().split('T')[0]
|
|
328
|
+
const url: string = `${LEARNING_PATHS_PATH}/method-intro-video-complete-actions`
|
|
329
|
+
const body = { brand: brand, learningPathId: learningPathId, userDate: stringDate }
|
|
330
|
+
return (await fetchHandler(url, 'POST', null, body)) as DailySessionResponse
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
325
335
|
interface completeLearningPathIntroVideo {
|
|
326
336
|
intro_video_response: SyncWriteDTO<ContentProgress, any> | null
|
|
327
337
|
learning_path_reset_response: SyncWriteDTO<ContentProgress, any> | null
|