From 39581d769fafe577372c05807a25f84653e1789c Mon Sep 17 00:00:00 2001 From: David Meincke Date: Tue, 30 May 2023 11:33:42 +0200 Subject: [PATCH] only take sessions from last month --- Application/Helpers/SessionFiles.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Helpers/SessionFiles.cs b/Application/Helpers/SessionFiles.cs index ec6cb1c..86b7196 100644 --- a/Application/Helpers/SessionFiles.cs +++ b/Application/Helpers/SessionFiles.cs @@ -46,7 +46,7 @@ namespace CodeEditorApi.Helpers res.Add(GetSession(folder)); } - return res.OrderByDescending(x => x.Timestamp).ToArray(); + return res.Where(x => x.Timestamp > DateTime.UtcNow.AddMonths(-1)).OrderByDescending(x => x.Timestamp).ToArray(); } public static SessionData[] Get(Guid sessionId)