mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
fix
This commit is contained in:
@@ -444,7 +444,9 @@ exports.upsertLessonPage = async (req, res) => {
|
||||
}, { returning: true });
|
||||
|
||||
try {
|
||||
await recomputeDurations(lessonId);
|
||||
// Pass the blocks we just wrote directly instead of re-reading the page —
|
||||
// avoids depending on read-after-write visibility of the upsert we just did.
|
||||
await recomputeDurations(lessonId, blocks);
|
||||
} catch (durErr) {
|
||||
console.error("[LESSON LIB][PAGE][DURATION]", durErr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user