fix: sync rest timer exercise/set indices across sessions
All checks were successful
CI / update (push) Successful in 2m2s

restExerciseIdx and restSetIdx were sent by the client but never
persisted server-side, so other sessions couldn't display which
exercise/set the rest timer belonged to.
This commit is contained in:
2026-03-23 22:22:28 +01:00
parent 785341bf0b
commit 9245f3e17f
2 changed files with 13 additions and 1 deletions

View File

@@ -25,6 +25,8 @@ export interface IActiveWorkout {
savedAt: number;
restStartedAt: number | null;
restTotal: number;
restExerciseIdx: number;
restSetIdx: number;
updatedAt?: Date;
}
@@ -87,6 +89,14 @@ const ActiveWorkoutSchema = new mongoose.Schema(
restTotal: {
type: Number,
default: 0
},
restExerciseIdx: {
type: Number,
default: -1
},
restSetIdx: {
type: Number,
default: -1
}
},
{