fix: sync rest timer exercise/set indices across sessions
All checks were successful
CI / update (push) Successful in 2m2s
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:
@@ -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
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user