From 5d0b606e055556c1e38cd2410377b0f07efca0e6 Mon Sep 17 00:00:00 2001 From: Romain Antunes Date: Sun, 25 Dec 2022 18:34:03 +0100 Subject: [PATCH] =?UTF-8?q?FIX=20Probl=C3=A8me=20d'affichage=20des=20donn?= =?UTF-8?q?=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StudiesController.cs | 18 ++++++++++++------ .../statistics/statistics.component.ts | 2 +- .../services/statistics/statistics.service.ts | 2 +- .../src/app/services/timer/timer.service.ts | 14 ++++++++------ 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/kairos-api/Kairos.API/Controllers/StudiesController.cs b/kairos-api/Kairos.API/Controllers/StudiesController.cs index c2651c5..1c1ca7a 100644 --- a/kairos-api/Kairos.API/Controllers/StudiesController.cs +++ b/kairos-api/Kairos.API/Controllers/StudiesController.cs @@ -183,13 +183,16 @@ public async Task StopStudies() // On supprime l'ancienne session _memoryCache.Remove(userContext.UserId); + // Si la session a été actualisé il y a moins de 2 {MinutesMinimumHeatbeat} minutes minutes if (liveStudy.LastRefresh.AddMinutes(MinutesMinimumHeatbeat) < DateTime.UtcNow) { // On la sauvegarde dans la base de données avec le temps du dernier battement - var study = new Studies(Guid.NewGuid().ToString(), - ((int) (liveStudy.LastRefresh - liveStudy.StartTime).TotalSeconds).ToString( - CultureInfo.InvariantCulture), - liveStudy.StartTime, GetPersonalGroup()); + var study = new Studies( + Guid.NewGuid().ToString(), + ((int) (liveStudy.LastRefresh - liveStudy.StartTime).TotalSeconds).ToString(CultureInfo.InvariantCulture), + liveStudy.StartTime, + GetPersonalGroup() + ); study.Labels = new List