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