feat: prepare six-lesson trial backend with reliable rewards and operations
Backend CI / type-check, build, tests (push) Successful in 1m0s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-12 14:35:42 +03:30
co-authored by Cursor
parent 5e5a14030a
commit dfb20ca92c
46 changed files with 2589 additions and 123 deletions
+6 -4
View File
@@ -46,10 +46,12 @@ export class ProgressionSyncService {
) {}
syncUserProgressionState(userId: string): UserState {
const state = this.users.getUserState(userId)
const items = this.buildLevelItems(userId)
this.syncLegacyMapLevels(state, items)
return this.users.saveUserState(state)
return this.database.transaction(() => {
const state = this.users.getUserState(userId)
const items = this.buildLevelItems(userId)
this.syncLegacyMapLevels(state, items)
return this.users.saveUserState(state)
})
}
private getProgressRow(userId: string, levelId: number): LevelProgressRow | undefined {