diff --git a/projects/backend/src/service/score.service.ts b/projects/backend/src/service/score.service.ts index 7b258c8..ec1d70e 100644 --- a/projects/backend/src/service/score.service.ts +++ b/projects/backend/src/service/score.service.ts @@ -211,6 +211,7 @@ export class ScoreService { left: score.accLeft, right: score.accRight, }, + timestamp: new Date(score.timeset), } as AdditionalScoreData; if (rawScoreImprovement && rawScoreImprovement.score > 0) { data.scoreImprovement = { diff --git a/projects/common/src/model/additional-score-data/additional-score-data.ts b/projects/common/src/model/additional-score-data/additional-score-data.ts index 580597d..98f79a6 100644 --- a/projects/common/src/model/additional-score-data/additional-score-data.ts +++ b/projects/common/src/model/additional-score-data/additional-score-data.ts @@ -120,6 +120,12 @@ export class AdditionalScoreData { */ handAccuracy: HandAccuracy; }; + + /** + * The date the score was set on. + */ + @prop({ required: true, index: true }) + public timestamp!: Date; } export type AdditionalScoreDataDocument = AdditionalScoreData & Document;